]> git.mjollnir.org Git - s9y.git/commitdiff
improve fetchcomments hook
authorgarvinhicking <garvinhicking>
Thu, 17 Jan 2008 15:00:13 +0000 (15:00 +0000)
committergarvinhicking <garvinhicking>
Thu, 17 Jan 2008 15:00:13 +0000 (15:00 +0000)
include/functions_comments.inc.php

index 7be37429e1cca25b971a386b44cc5af7a62365f0..875c6f4b8cb9f55e9867bd597b2f8722702a16d3 100644 (file)
@@ -181,10 +181,11 @@ function serendipity_fetchComments($id, $limit = null, $order = '', $showAll = f
     $comments = serendipity_db_query($query, false, 'assoc');
 
     if (!is_array($comments)) {
-        return array();
+        $comments = array();
     }
 
-    serendipity_plugin_api::hook_event('fetchcomments', $comments);
+    $addData = array('id' => $id, 'limit' => $limit, 'order' => $order, 'showAll' => $showAll, 'type' => $type, 'where' => $where);
+    serendipity_plugin_api::hook_event('fetchcomments', $comments, $addData);
 
     return $comments;
 }