From 2ecc273c60f3b625fe3b44005813e73eba5ea57a Mon Sep 17 00:00:00 2001 From: webchick Date: Sun, 26 Jun 2011 23:11:35 -0700 Subject: Issue #253725 by jhodgdon: Fixed () in search results does not have array keys on comments and uploads values. --- modules/node/node.api.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'modules/node/node.api.php') diff --git a/modules/node/node.api.php b/modules/node/node.api.php index d7a98c6fb..90ffd8b7f 100644 --- a/modules/node/node.api.php +++ b/modules/node/node.api.php @@ -642,14 +642,20 @@ function hook_node_prepare($node) { * @param $node * The node being displayed in a search result. * - * @return - * Extra information to be displayed with search result. + * @return array + * Extra information to be displayed with search result. This information + * should be presented as an associative array. It will be concatenated + * with the post information (last updated, author) in the default search + * result theming. + * + * @see template_preprocess_search_result() + * @see search-result.tpl.php * * @ingroup node_api_hooks */ function hook_node_search_result($node) { $comments = db_query('SELECT comment_count FROM {node_comment_statistics} WHERE nid = :nid', array('nid' => $node->nid))->fetchField(); - return format_plural($comments, '1 comment', '@count comments'); + return array('comment' => format_plural($comments, '1 comment', '@count comments')); } /** -- cgit v1.2.3