[geeklog-cvs] geeklog: Use the page title as a title attribute, if present

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sat Mar 27 10:51:53 EDT 2010


changeset 7841:f8109f8f4ac1
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/f8109f8f4ac1
user: Dirk Haun <dirk at haun-online.de>
date: Sat Mar 27 15:06:54 2010 +0100
description:
Use the page title as a title attribute, if present

diffstat:

 system/lib-admin.php |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (16 lines):

diff -r 150710d60183 -r f8109f8f4ac1 system/lib-admin.php
--- a/system/lib-admin.php	Sat Mar 27 15:06:16 2010 +0100
+++ b/system/lib-admin.php	Sat Mar 27 15:06:54 2010 +0100
@@ -909,7 +909,11 @@
         $A['title'] = str_replace('$', '$', $A['title']);
         $article_url = COM_buildUrl($_CONF['site_url'] . '/article.php?story='
                                     . $A['sid']);
-        $retval = COM_createLink(stripslashes($A['title']), $article_url);
+        $attr = array();
+        if (! empty($A['page_title'])) {
+            $attr['title'] = htmlspecialchars($A['page_title']);
+        }
+        $retval = COM_createLink(stripslashes($A['title']), $article_url, $attr);
         break;
 
     case 'draft_flag':



More information about the geeklog-cvs mailing list