From 638701000ce27d69fd9ba6de25e558b36bc07e31 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Fri, 29 Jan 2010 17:27:30 +0000 Subject: [PATCH] * (bug 22315) SpecialRecentChangesQuery hook now pass $query_options and checks the return value --- RELEASE-NOTES | 2 ++ docs/hooks.txt | 1 + includes/specials/SpecialRecentchanges.php | 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index c0ccb2bd0a..e901672b99 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -312,6 +312,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN restrict/expand it. * (bug 21936) When a revision has been patrolled, there's now a link back to the article +* (bug 22315) SpecialRecentChangesQuery hook now pass $query_options and checks + the return value === Bug fixes in 1.16 === diff --git a/docs/hooks.txt b/docs/hooks.txt index 156feb9bc9..a74d4bcbf8 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -1479,6 +1479,7 @@ SpecialRecentChanges &$tables: array of tables to be queried &$join_conds: join conditions for the tables $opts: FormOptions for this request +&$query_options: array of options for the database request 'SpecialSearchNogomatch': called when user clicked the "Go" button but the target doesn't exist diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index 1f4bb7c10d..dca658c8c2 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -295,7 +295,8 @@ class SpecialRecentChanges extends SpecialPage { $tables, $fields, $conds, $join_conds, $query_options, $opts['tagfilter'] ); - wfRunHooks('SpecialRecentChangesQuery', array( &$conds, &$tables, &$join_conds, $opts ) ); + if ( !wfRunHooks( 'SpecialRecentChangesQuery', array( &$conds, &$tables, &$join_conds, $opts, &$query_options ) ) ) + return false; // Don't use the new_namespace_time timestamp index if: // (a) "All namespaces" selected -- 2.20.1