summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-09-01 14:30:51 +0400
committerAndrew Dolgov <[email protected]>2009-09-01 14:30:51 +0400
commitc9efd838a930976b8e2dd87ad6ce065d037bf6a0 (patch)
tree14108ac18e758dd5b0eb225023a3ba19ffa2cfc6 /functions.php
parent786ecb42c07a090ded3d29333f63aa920301989d (diff)
properly allow article to be expanded in CDM mode when article excerpt is blank
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/functions.php b/functions.php
index 044b0162a..3249a5d7b 100644
--- a/functions.php
+++ b/functions.php
@@ -5229,7 +5229,14 @@
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>";
}