* Added 'orderby' parameter to plugin API hooks for the serendipity

fulltext search function (garvinhicking)
This commit is contained in:
Garvin Hicking 2009-08-21 08:09:52 +00:00
parent 36be598dc1
commit 6e8f54f588
2 changed files with 5 additions and 1 deletions

View File

@ -3,6 +3,9 @@
Version 1.5 ()
------------------------------------------------------------------------
* Added 'orderby' parameter to plugin API hooks for the serendipity
fulltext search function (garvinhicking)
* Added new event hook frontend_sidebar_plugins to iterate through
sidebar plugins and modify their output. $eventData is the array
of their data. (garvinhicking)

View File

@ -787,6 +787,7 @@ function &serendipity_searchEntries($term, $limit = '', $searchresults = '') {
}
}
$cond['orderby'] = "timestamp DESC";
$cond['and'] = " AND isdraft = 'false' " . (!serendipity_db_bool($serendipity['showFutureEntries']) ? " AND timestamp <= " . serendipity_db_time() : '');
serendipity_plugin_api::hook_event('frontend_fetchentries', $cond, array('source' => 'search', 'term' => $term));
serendipity_ACL_SQL($cond, 'limited');
@ -823,7 +824,7 @@ function &serendipity_searchEntries($term, $limit = '', $searchresults = '') {
{$serendipity['fullCountQuery']}
{$cond['group']}
{$cond['having']}
ORDER BY timestamp DESC
ORDER BY {$cond['orderby']}
$limit";
$search =& serendipity_db_query($querystring);