* Added 'orderby' parameter to plugin API hooks for the serendipity
fulltext search function (garvinhicking)
This commit is contained in:
parent
36be598dc1
commit
6e8f54f588
@ -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)
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user