[geeklog-cvs] geeklog: Fixed visibility of the "Send Ping" links in the Story ...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Thu Sep 10 07:45:38 EDT 2009


details:   http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/8689bd624973
changeset: 7300:8689bd624973
user:      Dirk Haun <dirk at haun-online.de>
date:      Thu Sep 10 13:36:34 2009 +0200
description:
Fixed visibility of the "Send Ping" links in the Story Admin's list of stories and the Story Options block

diffstat:

 public_html/article.php  |  21 ++++++++++++++-------
 public_html/docs/history |   2 ++
 system/lib-admin.php     |   9 +++++----
 3 files changed, 21 insertions(+), 11 deletions(-)

diffs (63 lines):

diff -r dd4e3922f617 -r 8689bd624973 public_html/article.php
--- a/public_html/article.php	Thu Sep 10 10:06:32 2009 +0200
+++ b/public_html/article.php	Thu Sep 10 13:36:34 2009 +0200
@@ -320,14 +320,21 @@
                                                         'class' => $feedClass));
             }
         }
-        if ($_CONF['trackback_enabled'] &&
-                ($story->displayElements('trackbackcode') >= 0) &&
-                SEC_hasRights('story.ping') &&
+        if (($_CONF['trackback_enabled'] || $_CONF['pingback_enabled'] ||
+                $_CONF['ping_enabled']) && SEC_hasRights('story.ping') &&
                 ($story->displayElements('draft_flag') == 0) &&
-                ($story->displayElements('day') < time ())) {
-            $url = $_CONF['site_admin_url']
-                 . '/trackback.php?mode=sendall&id=' . $story->getSid();
-            $story_options[] = COM_createLink($LANG_TRB['send_trackback'], $url);
+                ($story->displayElements('day') < time ()) &&
+                ($story->displayElements('perm_anon') != 0)) {
+                
+            // check special case: no link when Trackbacks are disabled for this
+            // story AND pinging weblog directories is disabled
+            if (($story->displayElements('trackbackcode') >= 0) ||
+                    $_CONF['ping_enabled']) {
+                $url = $_CONF['site_admin_url']
+                     . '/trackback.php?mode=sendall&id=' . $story->getSid();
+                $story_options[] = COM_createLink($LANG_TRB['send_trackback'],
+                                                  $url);
+            }
         }
     /*
         if (true) { // can subscribe
diff -r dd4e3922f617 -r 8689bd624973 public_html/docs/history
--- a/public_html/docs/history	Thu Sep 10 10:06:32 2009 +0200
+++ b/public_html/docs/history	Thu Sep 10 13:36:34 2009 +0200
@@ -3,6 +3,8 @@
 Oct ??, 2009 (1.6.1)
 ------------
 
+- Fixed visibility of the "Send Ping" links in the Story Admin's list of stories
+  and the Story Options block [Dirk]
 - The install script was switching back to English in some upgrade scenarios
   (bug #0000969, patch provided by taca)
 - Added a workaround to not lose the XMLSitemap priorities for Locales where
diff -r dd4e3922f617 -r 8689bd624973 system/lib-admin.php
--- a/system/lib-admin.php	Thu Sep 10 10:06:32 2009 +0200
+++ b/system/lib-admin.php	Thu Sep 10 13:36:34 2009 +0200
@@ -934,10 +934,11 @@
         break;
 
     case 'ping':
-        $pingico = '<img src="' . $_CONF['layout_url'] . '/images/sendping.'
-                 . $_IMAGE_TYPE . '" alt="' . $LANG24[21] . '" title="'
-                 . $LANG24[21] . '"' . XHTML . '>';
-        if (($A['draft_flag'] == 0) && ($A['unixdate'] < time())) {
+        if (($A['draft_flag'] == 0) && ($A['unixdate'] < time()) &&
+                ($A['perm_anon'] != 0)) {
+            $pingico = '<img src="' . $_CONF['layout_url'] . '/images/sendping.'
+                     . $_IMAGE_TYPE . '" alt="' . $LANG24[21] . '" title="'
+                     . $LANG24[21] . '"' . XHTML . '>';
             $url = $_CONF['site_admin_url']
                  . '/trackback.php?mode=sendall&id=' . $A['sid'];
             $retval = COM_createLink($pingico, $url);



More information about the geeklog-cvs mailing list