Nullzero has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/111734

Change subject: Make list=allfileusages functional
......................................................................

Make list=allfileusages functional

Querying list=allfileusages with affrom, afto, or afunique
will always get afinvalidtitle because the code passes the namespace
wrongly. This patch fixes the problem.

Change-Id: I010dc3a03be74f49902fd446e7dbc306c16b869c
---
M includes/api/ApiQueryAllLinks.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/34/111734/1

diff --git a/includes/api/ApiQueryAllLinks.php 
b/includes/api/ApiQueryAllLinks.php
index 13f766e..bccc25f 100644
--- a/includes/api/ApiQueryAllLinks.php
+++ b/includes/api/ApiQueryAllLinks.php
@@ -149,14 +149,14 @@
 
                // 'continue' always overrides 'from'
                $from = ( $continue || $params['from'] === null ? null :
-                       $this->titlePartToKey( $params['from'], 
$params['namespace'] ) );
+                       $this->titlePartToKey( $params['from'], $namespace ) );
                $to = ( $params['to'] === null ? null :
-                       $this->titlePartToKey( $params['to'], 
$params['namespace'] ) );
+                       $this->titlePartToKey( $params['to'], $namespace ) );
                $this->addWhereRange( $pfx . $fieldTitle, 'newer', $from, $to );
 
                if ( isset( $params['prefix'] ) ) {
                        $this->addWhere( $pfx . $fieldTitle . $db->buildLike( 
$this->titlePartToKey(
-                               $params['prefix'], $params['namespace'] ), 
$db->anyString() ) );
+                               $params['prefix'], $namespace ), 
$db->anyString() ) );
                }
 
                $this->addFields( array( 'pl_title' => $pfx . $fieldTitle ) );

-- 
To view, visit https://gerrit.wikimedia.org/r/111734
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I010dc3a03be74f49902fd446e7dbc306c16b869c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Nullzero <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to