Search on author
Matt B - June 21, 2007 - 05:27
| Project: | Authorship Module |
| Version: | 5.x-1.1 |
| Component: | Code |
| Category: | feature request |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | closed |
Description
I wanted to be able to include the authorship information in the search results. I've put the following code into authorship_nodeapi as the last case in the switch statement and it works fine for me!
case 'update index':
$sql = "SELECT authorship ".
"FROM {node_authorship} WHERE nid = %d";
$row = db_fetch_object(db_query($sql, $node->nid));
return $row->authorship;
break; // end 'update index'One might want to be able to set this capability as an option on authorship administration and put an if statement to control this in the above...
Hope you find it useful
Matt

#1
If you would liek to test/review this patch please and I'll commit if it does what you expect.
#2
AJK
It works as expected, thanks!
Matt
#3
Committed, thx!
http://drupal.org/cvs?commit=73303
#4