Closed (fixed)
Project:
Organic Groups
Version:
master
Component:
og.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Nov 2008 at 00:47 UTC
Updated:
28 Nov 2008 at 01:31 UTC
With the current apachesolr search results with nodeaccess turned on, group id of a discussion is returned as
* $doc->nodeaccess_og_subscriber or $doc->nodeaccess_og_admin
instead of
* $doc->og_groups or $doc->og_groups_both
Thus when $extra += node_invoke_nodeapi($doc, 'search result'); is called, it shows '0 groups' always.
There is a hook 'apachesolr_process_results' that is run after, where I would like to unset the '0 groups' and process it further. However, the key of '0 groups' is a number. I would prefer if the key of '0 groups' in the 'extra' search results, was something specific such as 'og_msg' to be able to easily change or unset this.
- return format_plural(count($current_groups['accessible']), '1 group', '@count groups');
+ $msg = format_plural(count($current_groups['accessible']), '1 group', '@count groups');
+ return array('og_msg' => $msg);
| Comment | File | Size | Author |
|---|---|---|---|
| og_search_results.patch | 931 bytes | aufumy |
Comments
Comment #1
moshe weitzman commentedCommitted. Seems like every module should do that in this hook. Currently they do not (comment, upload, book, ...).
Thanks for the fine bug report and for working on apachesolr.