From 391781fd1cdbbe70de2abde2be08f0564ed84d49 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Thu, 17 Jan 2008 15:00:13 +0000 Subject: [PATCH] improve fetchcomments hook --- include/functions_comments.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; } -- 2.39.5