* Added 'orderby' parameter to plugin API hooks for the serendipity
fulltext search function (garvinhicking)
This commit is contained in:
@ -3,6 +3,9 @@
|
|||||||
Version 1.5 ()
|
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
|
* Added new event hook frontend_sidebar_plugins to iterate through
|
||||||
sidebar plugins and modify their output. $eventData is the array
|
sidebar plugins and modify their output. $eventData is the array
|
||||||
of their data. (garvinhicking)
|
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() : '');
|
$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_plugin_api::hook_event('frontend_fetchentries', $cond, array('source' => 'search', 'term' => $term));
|
||||||
serendipity_ACL_SQL($cond, 'limited');
|
serendipity_ACL_SQL($cond, 'limited');
|
||||||
@ -823,7 +824,7 @@ function &serendipity_searchEntries($term, $limit = '', $searchresults = '') {
|
|||||||
{$serendipity['fullCountQuery']}
|
{$serendipity['fullCountQuery']}
|
||||||
{$cond['group']}
|
{$cond['group']}
|
||||||
{$cond['having']}
|
{$cond['having']}
|
||||||
ORDER BY timestamp DESC
|
ORDER BY {$cond['orderby']}
|
||||||
$limit";
|
$limit";
|
||||||
|
|
||||||
$search =& serendipity_db_query($querystring);
|
$search =& serendipity_db_query($querystring);
|
||||||
|
Reference in New Issue
Block a user