[geeklog-cvs] geeklog: Avoid pair of empty brackets on the printer-friendly ve...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun Nov 29 16:03:34 EST 2009


changeset 7499:5b5c1a258833
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/5b5c1a258833
user: Dirk Haun <dirk at haun-online.de>
date: Sun Nov 29 19:37:05 2009 +0100
description:
Avoid pair of empty brackets on the printer-friendly version for Static Pages without comments

diffstat:

 plugins/staticpages/functions.inc             |  5 ++++-
 plugins/staticpages/templates/printable.thtml |  2 +-
 public_html/docs/history                      |  2 ++
 3 files changed, 7 insertions(+), 2 deletions(-)

diffs (38 lines):

diff -r 6c5a648a4d05 -r 5b5c1a258833 plugins/staticpages/functions.inc
--- a/plugins/staticpages/functions.inc	Sun Nov 29 19:10:37 2009 +0100
+++ b/plugins/staticpages/functions.inc	Sun Nov 29 19:37:05 2009 +0100
@@ -441,7 +441,10 @@
         $numComments = COM_numberFormat($comments);
         $print->set_var('story_comments', $numComments);
         $print->set_var('comments_url', $commentsUrl);
-        $print->set_var('comments_text', $numComments . ' ' . $LANG01[3]);
+        $comments_text = $numComments . ' ' . $LANG01[3];
+        $print->set_var('comments_text', $comments_text);
+        $print->set_var('comments_text_in_brackets',
+                        '(' . $comments_text . ')');
         $print->set_var('comments_count', $numComments);
         $print->set_var('lang_comments', $LANG01[3]);
         $comments_with_count = sprintf($LANG01[121], $numComments);
diff -r 6c5a648a4d05 -r 5b5c1a258833 plugins/staticpages/templates/printable.thtml
--- a/plugins/staticpages/templates/printable.thtml	Sun Nov 29 19:10:37 2009 +0100
+++ b/plugins/staticpages/templates/printable.thtml	Sun Nov 29 19:37:05 2009 +0100
@@ -16,6 +16,6 @@
     <p>{site_name}<br{xhtml}>
         <a href="{sp_url}">{sp_url}</a>
     </p>
-<p>({comments_text})</p>
+<p>{comments_text_in_brackets}</p>
 </body>
 </html>
diff -r 6c5a648a4d05 -r 5b5c1a258833 public_html/docs/history
--- a/public_html/docs/history	Sun Nov 29 19:10:37 2009 +0100
+++ b/public_html/docs/history	Sun Nov 29 19:37:05 2009 +0100
@@ -14,6 +14,8 @@
 
 Static Pages Plugin 1.6.2
 -------------------
+- Avoid pair of empty brackets on the printer-friendly version for Static Pages
+  without comments [Dirk]
 - Added a config option to define the default sort order for the admin's list
   of Static Pages (feature request #0000812) [Dirk]
 - Made the initial size of the Static Pages edit area (when using FCKEditor)



More information about the geeklog-cvs mailing list