[geeklog-cvs] geeklog: Fixed bug if no new story comments found.

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Tue Mar 16 15:20:29 EDT 2010


changeset 7804:393e470f1bca
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/393e470f1bca
user: Tom <websitemaster at cogeco.net>
date: Tue Mar 16 15:14:00 2010 -0400
description:
Fixed bug if no new story comments found.

diffstat:

 system/lib-plugins.php |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (25 lines):

diff -r 50b0f02da1d8 -r 393e470f1bca system/lib-plugins.php
--- a/system/lib-plugins.php	Tue Mar 16 15:03:00 2010 -0400
+++ b/system/lib-plugins.php	Tue Mar 16 15:14:00 2010 -0400
@@ -1968,7 +1968,7 @@
         $plugintypes[] = $type;
     }
    
-     if (!($type == 'article') || ($type == 'story')) {
+     if (!(($type == 'article') || ($type == 'story'))) {
         // Now check new comments for plugins
         foreach ($plugintypes as $pi_name) {
             $fn_head = 'plugin_whatsnewsupported_' . $pi_name;
@@ -1981,7 +1981,11 @@
                     if (function_exists($fn_new)) {
                         $tempwhatsnew = $fn_new ($numreturn, $uid);
                         if(!empty($tempwhatsnew) && is_array($tempwhatsnew)) {
-                            $whatsnew = array_merge($tempwhatsnew, $whatsnew);
+                            if (!empty($whatsnew)) {
+                                $whatsnew = array_merge($tempwhatsnew, $whatsnew);
+                            } else {
+                                $whatsnew = $tempwhatsnew;
+                            }
                         }
                     }
                 }



More information about the geeklog-cvs mailing list