From: James D. Forrester Date: Tue, 2 Oct 2018 01:15:10 +0000 (-0700) Subject: Drop 'SpecialRecentChangesQuery' & 'SpecialWatchlistQuery' hooks, deprecated in 1.23 X-Git-Tag: 1.34.0-rc.0~3907^2 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=144b64353779c063a760113fbe7233b5b7c20ccc;p=lhc%2Fweb%2Fwiklou.git Drop 'SpecialRecentChangesQuery' & 'SpecialWatchlistQuery' hooks, deprecated in 1.23 Depends-On: I9822bb2bc1bcc13eec7924208bf3819d3512ad26 Change-Id: I67c06bb99d9c9582a638f061f523661c821bca8d --- diff --git a/RELEASE-NOTES-1.32 b/RELEASE-NOTES-1.32 index d875017297..117b939239 100644 --- a/RELEASE-NOTES-1.32 +++ b/RELEASE-NOTES-1.32 @@ -328,6 +328,9 @@ because of Phabricator reports. phase. * The global function wfErrorLog, deprecated since 1.25, has now been removed. Use MWLoggerLegacyLogger::emit or UDPTransport. + The hooks 'SpecialRecentChangesQuery' & 'SpecialWatchlistQuery', deprecated in + 1.23, were removed. Instead, use ChangesListSpecialPageStructuredFilters or + ChangesListSpecialPageQuery. === Deprecations in 1.32 === * HTMLForm::setSubmitProgressive() is deprecated. No need to call it. Submit diff --git a/docs/hooks.txt b/docs/hooks.txt index d82f56e08e..78ed1b4c0c 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -3338,17 +3338,6 @@ SpecialRecentChanges. &$extraOpts: array of added items, to which can be added $opts: FormOptions for this request -'SpecialRecentChangesQuery': DEPRECATED since 1.23! Use -ChangesListSpecialPageStructuredFilters or ChangesListSpecialPageQuery instead. -Called when building SQL query for SpecialRecentChanges and -SpecialRecentChangesLinked. -&$conds: array of WHERE conditionals for query -&$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 -&$select: Array of columns to select - 'SpecialResetTokensTokens': Called when building token list for SpecialResetTokens. &$tokens: array of token information arrays in the format of @@ -3452,15 +3441,6 @@ SpecialWatchlist. Allows extensions to register custom values they have inserted to rc_type so they can be returned as part of the watchlist. &$nonRevisionTypes: array of values in the rc_type field of recentchanges table -'SpecialWatchlistQuery': DEPRECATED since 1.23! Use -ChangesListSpecialPageStructuredFilters or ChangesListSpecialPageQuery instead. -Called when building sql query for SpecialWatchlist. -&$conds: array of WHERE conditionals for query -&$tables: array of tables to be queried -&$join_conds: join conditions for the tables -&$fields: array of query fields -$opts: A FormOptions object with watchlist options for the current request - 'TestCanonicalRedirect': Called when about to force a redirect to a canonical URL for a title when we have no other parameters on the URL. Gives a chance for extensions that alter page view behavior radically to abort that redirect or diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index 3e8bf1202c..170f792ead 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -339,17 +339,6 @@ class SpecialRecentChanges extends ChangesListSpecialPage { return $rows; } - protected function runMainQueryHook( &$tables, &$fields, &$conds, - &$query_options, &$join_conds, $opts - ) { - return parent::runMainQueryHook( $tables, $fields, $conds, $query_options, $join_conds, $opts ) - && Hooks::run( - 'SpecialRecentChangesQuery', - [ &$conds, &$tables, &$join_conds, $opts, &$query_options, &$fields ], - '1.23' - ); - } - protected function getDB() { return wfGetDB( DB_REPLICA, 'recentchanges' ); } diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index 2445c10cde..feb449c847 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -425,17 +425,6 @@ class SpecialWatchlist extends ChangesListSpecialPage { ); } - protected function runMainQueryHook( &$tables, &$fields, &$conds, &$query_options, - &$join_conds, $opts - ) { - return parent::runMainQueryHook( $tables, $fields, $conds, $query_options, $join_conds, $opts ) - && Hooks::run( - 'SpecialWatchlistQuery', - [ &$conds, &$tables, &$join_conds, &$fields, $opts ], - '1.23' - ); - } - /** * Return a IDatabase object for reading * diff --git a/tests/phpunit/includes/specials/SpecialWatchlistTest.php b/tests/phpunit/includes/specials/SpecialWatchlistTest.php index 5adbed813d..2ebefacb4e 100644 --- a/tests/phpunit/includes/specials/SpecialWatchlistTest.php +++ b/tests/phpunit/includes/specials/SpecialWatchlistTest.php @@ -18,11 +18,6 @@ class SpecialWatchlistTest extends SpecialPageTestBase { null ); - $this->setTemporaryHook( - 'SpecialWatchlistQuery', - null - ); - $this->setTemporaryHook( 'ChangesListSpecialPageQuery', null