[geeklog-hg] geeklog: Fixed a bug where sending a ping to a search engine cau...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sat Feb 15 03:55:00 EST 2014


changeset 9492:6063dba340b7
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/6063dba340b7
user: Kenji ITO <mystralkk at gmail.com>
date: Sat Feb 15 17:53:01 2014 +0900
description:
Fixed a bug where sending a ping to a search engine caused an error with XMLSitemap plugin

diffstat:

 plugins/xmlsitemap/functions.inc        |  3 ++-
 plugins/xmlsitemap/xmlsitemap.class.php |  6 +++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diffs (38 lines):

diff -r ce854d9eec04 -r 6063dba340b7 plugins/xmlsitemap/functions.inc
--- a/plugins/xmlsitemap/functions.inc	Fri Feb 14 23:32:21 2014 +0900
+++ b/plugins/xmlsitemap/functions.inc	Sat Feb 15 17:53:01 2014 +0900
@@ -362,7 +362,8 @@
 {
     global $_CONF, $_PLUGINS, $_TABLES, $_XMLSMAP_CONF;
 
-    if (count($_XMLSMAP_CONF[$name]) === 0) {
+    if (!in_array($name, array('types', 'priorities', 'frequencies')) ||
+            (count($_XMLSMAP_CONF[$name]) === 0)) {
         return;
     }
 
diff -r ce854d9eec04 -r 6063dba340b7 plugins/xmlsitemap/xmlsitemap.class.php
--- a/plugins/xmlsitemap/xmlsitemap.class.php	Fri Feb 14 23:32:21 2014 +0900
+++ b/plugins/xmlsitemap/xmlsitemap.class.php	Sat Feb 15 17:53:01 2014 +0900
@@ -567,10 +567,10 @@
 
         if ($sitemap == '') {
             COM_errorLog(__METHOD__ . ': sitemap file name is not specified.');
-            return false;
+            return 0;
         } else if (count($destinations) === 0) {
             COM_errorLog(__METHOD__ . ': target URL is not specified.');
-            return false;
+            return 0;
         }
 
         // Checks for the record of previous pings
@@ -581,7 +581,7 @@
         if (($result !== false) && (DB_numRows($result) == 1)) {
             $hasRecord = true;
             list ($A) = DB_fetchArray($result);
-            $records  = json_decode($A);
+            $records  = json_decode($A, true);
         } else {
             $records = array();
         }



More information about the geeklog-cvs mailing list