[geeklog-cvs] geeklog: Retrofitted $_SP_CONF['includesearch'] option (had to t...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Fri Oct 30 08:57:50 EDT 2009
changeset 7403:7a15ec67da80
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/7a15ec67da80
user: Dirk Haun <dirk at haun-online.de>
date: Fri Oct 30 12:00:15 2009 +0100
description:
Retrofitted $_SP_CONF['includesearch'] option (had to take it out to get Tom's patch integrated)
diffstat:
plugins/staticpages/functions.inc | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (25 lines):
diff -r f7706912e8be -r 7a15ec67da80 plugins/staticpages/functions.inc
--- a/plugins/staticpages/functions.inc Thu Oct 15 13:05:28 2009 -0400
+++ b/plugins/staticpages/functions.inc Fri Oct 30 12:00:15 2009 +0100
@@ -600,7 +600,11 @@
*/
function plugin_dopluginsearch_staticpages($query, $datestart, $dateend, $topic, $type, $author, $keyType, $page, $perpage)
{
- global $_TABLES, $_DB_dbms, $LANG_STATIC, $LANG09;
+ global $_TABLES, $_DB_dbms, $LANG_STATIC, $LANG09, $_SP_CONF;
+
+ if ($_SP_CONF['includesearch'] != 1) {
+ return;
+ }
// Make sure the query is SQL safe
$query = trim(addslashes($query));
@@ -1298,7 +1302,7 @@
$sql = "SELECT sp_id, sp_title
FROM {$_TABLES['staticpage']}
- WHERE NOT ISNULL(sp_content) AND (sp_date >= (date_sub(NOW(), INTERVAL {$_SP_CONF['newstaticpagesinterval']} SECOND)))
+ WHERE NOT ISNULL(sp_content) AND (sp_date >= (DATE_SUB(NOW(), INTERVAL {$_SP_CONF['newstaticpagesinterval']} SECOND)))
{$extra_sql}
" . COM_getPermSQL( 'AND' ) . "
ORDER BY sp_date DESC LIMIT 15";
More information about the geeklog-cvs
mailing list