From: garvinhicking Date: Thu, 17 Jan 2008 15:00:13 +0000 (+0000) Subject: improve fetchcomments hook X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=391781fd1cdbbe70de2abde2be08f0564ed84d49;p=s9y.git improve fetchcomments hook --- diff --git a/include/functions_comments.inc.php b/include/functions_comments.inc.php index 7be3742..875c6f4 100644 --- a/include/functions_comments.inc.php +++ b/include/functions_comments.inc.php @@ -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; }