From ce824ff8f70c7d5ed9f2a671372dba5d9382fef7 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Sat, 25 Jun 2022 22:15:49 +0200 Subject: specialpage: Fix deprecation for QueryPage::getSQL The deprecation must be detected outside of the function, which gets overridden, because there is no need to call parent by the overridden function. Follow-Up: Idd60ef34cd808952a3156fb61904f193a445b9f8 Change-Id: Ice85209f0bfe3bfdf7373cf9e1a728a1fe9d25b6 --- includes/specialpage/QueryPage.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'includes/specialpage') diff --git a/includes/specialpage/QueryPage.php b/includes/specialpage/QueryPage.php index 2e78d7dcfda8..3f54b9175293 100644 --- a/includes/specialpage/QueryPage.php +++ b/includes/specialpage/QueryPage.php @@ -223,12 +223,7 @@ abstract class QueryPage extends SpecialPage { * @suppress PhanPluginNeverReturnMethod */ protected function getSQL() { - MWDebug::detectDeprecatedOverride( - $this, - __CLASS__, - 'getSQL', - '1.39' - ); + wfDeprecated( __METHOD__, '1.39' ); throw new MWException( "Bug in a QueryPage: doesn't implement getQueryInfo() nor " . "getQuery() properly" ); } @@ -535,6 +530,12 @@ abstract class QueryPage extends SpecialPage { ); } else { // Old-fashioned raw SQL style, deprecated + MWDebug::detectDeprecatedOverride( + $this, + __CLASS__, + 'getSQL', + '1.39' + ); $sql = $this->getSQL(); $sql .= ' ORDER BY ' . implode( ', ', $order ); $sql = $dbr->limitResult( $sql, $limit, $offset ); -- cgit v1.2.3