1.1 --- a/src/org/sonews/storage/impl/DrupalDatabase.java Thu Oct 20 10:50:58 2011 +0200
1.2 +++ b/src/org/sonews/storage/impl/DrupalDatabase.java Sun Oct 30 22:10:43 2011 +0100
1.3 @@ -419,7 +419,11 @@
1.4 String text = m.getBodyXhtmlFragment();
1.5
1.6 if (subject == null || subject.length() < 1) {
1.7 - subject = text.substring(0, Math.min(10, text.length()));
1.8 + String plainText = m.getBodyPlainText();
1.9 + subject = plainText.substring(0, Math.min(32, plainText.length()));
1.10 + if (subject.length() < plainText.length()) {
1.11 + subject = subject + "…";
1.12 + }
1.13 }
1.14
1.15 insertArticle(article.getAuthenticatedUser(), subject, text, parentID, groupID);