make sure enclosure urls fit in the database field

This commit is contained in:
Athou
2013-05-23 10:03:15 +02:00
parent c9f2b545c9
commit f9cfea4f79
4 changed files with 14 additions and 12 deletions

View File

@@ -9,6 +9,7 @@ import com.commafeed.backend.dao.FeedEntryDAO;
import com.commafeed.backend.dao.FeedEntryStatusDAO;
import com.commafeed.backend.dao.FeedSubscriptionDAO;
import com.commafeed.backend.feeds.FeedRefreshTaskGiver;
import com.commafeed.backend.feeds.FeedUtils;
import com.commafeed.backend.model.Feed;
import com.commafeed.backend.model.FeedCategory;
import com.commafeed.backend.model.FeedEntry;
@@ -69,7 +70,7 @@ public class FeedSubscriptionService {
newSubscription = true;
}
sub.setCategory(category);
sub.setTitle(title.substring(0, Math.min(128, title.length())));
sub.setTitle(FeedUtils.truncate(title, 128));
feedSubscriptionDAO.saveOrUpdate(sub);
if (newSubscription) {