[php-blog-cvs] r2568 - in trunk: docs include
A reliable, secure & extensible PHP blog | Not mainstream since 2002
Brought to you by:
garvinhicking,
jhermanns
From: garvinhicking at B. <gar...@ma...> - 2009-08-21 08:10:10
|
Author: garvinhicking Date: 2009-08-21 10:09:52 +0200 (Fri, 21 Aug 2009) New Revision: 2568 Modified: trunk/docs/NEWS trunk/include/functions_entries.inc.php Log: * Added 'orderby' parameter to plugin API hooks for the serendipity fulltext search function (garvinhicking) Modified: trunk/docs/NEWS =================================================================== --- trunk/docs/NEWS 2009-08-15 08:38:47 UTC (rev 2567) +++ trunk/docs/NEWS 2009-08-21 08:09:52 UTC (rev 2568) @@ -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) Modified: trunk/include/functions_entries.inc.php =================================================================== --- trunk/include/functions_entries.inc.php 2009-08-15 08:38:47 UTC (rev 2567) +++ trunk/include/functions_entries.inc.php 2009-08-21 08:09:52 UTC (rev 2568) @@ -787,6 +787,7 @@ } } + $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 @@ {$serendipity['fullCountQuery']} {$cond['group']} {$cond['having']} - ORDER BY timestamp DESC + ORDER BY {$cond['orderby']} $limit"; $search =& serendipity_db_query($querystring); |