]> git.wh0rd.org Git - tt-rss.git/commitdiff
properly allow article to be expanded in CDM mode when article excerpt is blank
authorAndrew Dolgov <fox@bah.org.ru>
Tue, 1 Sep 2009 10:30:51 +0000 (14:30 +0400)
committerAndrew Dolgov <fox@bah.org.ru>
Tue, 1 Sep 2009 10:30:51 +0000 (14:30 +0400)
functions.php

index 044b0162a9ce2a33a6250ab3bc821f1ca067d71f..3249a5d7bf1fbee2b7058daef2b3a531fe9f88eb 100644 (file)
                                                print "<div class=\"cdmExcerpt\" id=\"CEXC-$id\"
                                                        onclick=\"cdmExpandArticle($id)\"
                                                        title=\"".__('Click to expand article')."\">";
-                                               print truncate_string(strip_tags($line["content_preview"]), 100);
+
+                                               $content_preview = trim(truncate_string(strip_tags($line["content_preview"]), 100));
+
+                                               if (strlen($content_preview) != 0) {
+                                                       print $content_preview;
+                                               } else {
+                                                       print __('Click to expand article');
+                                               }
                                                print "</div>";
                                        }