diff options
author | webchick <webchick@24967.no-reply.drupal.org> | 2011-06-26 23:11:35 -0700 |
---|---|---|
committer | webchick <webchick@24967.no-reply.drupal.org> | 2011-06-26 23:11:35 -0700 |
commit | 2ecc273c60f3b625fe3b44005813e73eba5ea57a (patch) | |
tree | 6c32911e66cf0f6a329dff9544934d265328afae /modules/node | |
parent | 67ff15fef110f4e64ab2e069bc94ba1773e376b1 (diff) | |
download | brdo-2ecc273c60f3b625fe3b44005813e73eba5ea57a.tar.gz brdo-2ecc273c60f3b625fe3b44005813e73eba5ea57a.tar.bz2 |
Issue #253725 by jhodgdon: Fixed () in search results does not have array keys on comments and uploads values.
Diffstat (limited to 'modules/node')
-rw-r--r-- | modules/node/node.api.php | 12 |
1 files changed, 9 insertions, 3 deletions
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')); } /** |