[geeklog-cvs] geeklog: Workaround to have a clickable title, even if your stat...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Mon Mar 29 07:34:27 EDT 2010


changeset 7858:e984ac628c6f
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/e984ac628c6f
user: Dirk Haun <dirk at haun-online.de>
date: Mon Mar 29 12:55:49 2010 +0200
description:
Workaround to have a clickable title, even if your static page admin was "creative" ...

diffstat:

 plugins/staticpages/functions.inc |  9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diffs (19 lines):

diff -r aa35484e45c8 -r e984ac628c6f plugins/staticpages/functions.inc
--- a/plugins/staticpages/functions.inc	Sun Mar 28 18:48:46 2010 +0200
+++ b/plugins/staticpages/functions.inc	Mon Mar 29 12:55:49 2010 +0200
@@ -1370,7 +1370,14 @@
         break;
 
     case 'sp_title':
-        $sp_title = stripslashes($A['sp_title']);
+        $sp_title = stripslashes(trim($A['sp_title']));
+        if (empty($sp_title)) {
+            $sp_title = $A['sp_page_title'];
+            if (empty($sp_title)) {
+                $sp_title = $A['sp_id'];
+            }
+            $sp_title = '(' . $sp_title . ')';
+        }
         $url = COM_buildUrl($_CONF['site_url'] .
                             '/staticpages/index.php?page=' . $A['sp_id']);
         $attr = array();



More information about the geeklog-cvs mailing list