[geeklog-cvs] geeklog: FR#619 - Allow plugins to return their own moderation d...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Tue Aug 10 14:23:25 EDT 2010


changeset 7959:4df4cb41453b
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/4df4cb41453b
user: jmucchiello
date: Sat Jun 12 00:02:45 2010 -0400
description:
FR#619 - Allow plugins to return their own moderation data.

diffstat:

 public_html/admin/moderation.php |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r 5f0090ed7156 -r 4df4cb41453b public_html/admin/moderation.php
--- a/public_html/admin/moderation.php	Fri Jun 11 23:07:21 2010 -0400
+++ b/public_html/admin/moderation.php	Sat Jun 12 00:02:45 2010 -0400
@@ -283,9 +283,8 @@
         $function = 'plugin_itemlist_' . $type;
         if (function_exists($function)) {
             // Great, we found the plugin, now call its itemlist method
-            $plugin = new Plugin();
             $plugin = $function();
-            if (isset($plugin)) {
+            if (is_object($plugin)) {
                 $helpfile = $plugin->submissionhelpfile;
                 $sql = $plugin->getsubmissionssql;
                 $H = $plugin->submissionheading;
@@ -294,6 +293,8 @@
                 if (($type != 'story') && ($type != 'story_draft')) {
                     $isplugin = true;
                 }
+            } else if (is_string($plugin)) {
+                return '<div class="block-box">' . $plugin . '</div>' . LB;
             }
         }
     }



More information about the geeklog-cvs mailing list