X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryAllDeletedRevisions.php;h=beaad4336f018df556037e4b75c5042cae4a6d38;hb=04d1aa3033f40a38d721f7f0e88b5bac440d2869;hp=7a1c4610004f2574e47de73a1855031d1ac4eb62;hpb=1d47891cc3d43bc6b47e30d0b605436c3dac1fc9;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryAllDeletedRevisions.php b/includes/api/ApiQueryAllDeletedRevisions.php index 7a1c461000..beaad4336f 100644 --- a/includes/api/ApiQueryAllDeletedRevisions.php +++ b/includes/api/ApiQueryAllDeletedRevisions.php @@ -49,7 +49,8 @@ class ApiQueryAllDeletedRevisions extends ApiQueryRevisionsBase { $user = $this->getUser(); $db = $this->getDB(); $params = $this->extractRequestParams( false ); - $revisionStore = MediaWikiServices::getInstance()->getRevisionStore(); + $services = MediaWikiServices::getInstance(); + $revisionStore = $services->getRevisionStore(); $result = $this->getResult(); @@ -131,7 +132,7 @@ class ApiQueryAllDeletedRevisions extends ApiQueryRevisionsBase { if ( !is_null( $params['tag'] ) ) { $this->addTables( 'change_tag' ); $this->addJoinConds( - [ 'change_tag' => [ 'INNER JOIN', [ 'ar_rev_id=ct_rev_id' ] ] ] + [ 'change_tag' => [ 'JOIN', [ 'ar_rev_id=ct_rev_id' ] ] ] ); $changeTagDefStore = MediaWikiServices::getInstance()->getChangeTagDefStore(); try { @@ -156,7 +157,8 @@ class ApiQueryAllDeletedRevisions extends ApiQueryRevisionsBase { $miser_ns = null; if ( $mode == 'all' ) { - $namespaces = $params['namespace'] ?? MWNamespace::getValidNamespaces(); + $namespaces = $params['namespace'] ?? + $services->getNamespaceInfo()->getValidNamespaces(); $this->addWhereFld( 'ar_namespace', $namespaces ); // For from/to/prefix, we have to consider the potential @@ -258,14 +260,14 @@ class ApiQueryAllDeletedRevisions extends ApiQueryRevisionsBase { $op = ( $dir == 'newer' ? '>' : '<' ); if ( $optimizeGenerateTitles ) { $this->dieContinueUsageIf( count( $cont ) != 2 ); - $ns = intval( $cont[0] ); + $ns = (int)$cont[0]; $this->dieContinueUsageIf( strval( $ns ) !== $cont[0] ); $title = $db->addQuotes( $cont[1] ); $this->addWhere( "ar_namespace $op $ns OR " . "(ar_namespace = $ns AND ar_title $op= $title)" ); } elseif ( $mode == 'all' ) { $this->dieContinueUsageIf( count( $cont ) != 4 ); - $ns = intval( $cont[0] ); + $ns = (int)$cont[0]; $this->dieContinueUsageIf( strval( $ns ) !== $cont[0] ); $title = $db->addQuotes( $cont[1] ); $ts = $db->addQuotes( $db->timestamp( $cont[2] ) );