Robmoen has uploaded a new change for review.

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

Change subject: Return listpages results in query object
......................................................................

Return listpages results in query object

bug: T94124
Change-Id: I41cd540c3faa4de0be3da5e619c0f9c9cdeb2b05
---
M includes/api/ApiQueryListPages.php
1 file changed, 7 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/61/203461/1

diff --git a/includes/api/ApiQueryListPages.php 
b/includes/api/ApiQueryListPages.php
index 767c031..acf0282 100644
--- a/includes/api/ApiQueryListPages.php
+++ b/includes/api/ApiQueryListPages.php
@@ -114,9 +114,8 @@
                                $titles = $this->queryListItems( $params, 
$isGenerator );
                        }
                }
-
                if ( !$isGenerator ) {
-                       $this->getResult()->setIndexedTagName_internal( 
$this->getModuleName(), 'wr' );
+                       $this->getResult()->setIndexedTagName_internal( 
$this->getModulePath(), 'wr' );
                } else {
                        $resultPageSet->populateFromTitles( $titles );
                }
@@ -159,7 +158,7 @@
                        if ( !$isGenerator ) {
                                $vals = array();
                                ApiQueryBase::addTitleInfo( $vals, $t );
-                               $fit = $this->getResult()->addValue( 
$this->getModuleName(), null, $vals );
+                               $fit = $this->getResult()->addValue( 
$this->getModulePath(), null, $vals );
                                if ( !$fit ) {
                                        $this->setContinueEnumParameter( 
'continue', $row->gli_order );
                                        break;
@@ -225,7 +224,7 @@
                        if ( !$isGenerator ) {
                                $vals = array();
                                ApiQueryBase::addTitleInfo( $vals, $t );
-                               $fit = $this->getResult()->addValue( 
$this->getModuleName(), null, $vals );
+                               $fit = $this->getResult()->addValue( 
$this->getModulePath(), null, $vals );
                                if ( !$fit ) {
                                        $this->setContinueEnumParameter( 
'continue', $row->wl_namespace . '|' . $row->wl_title );
                                        break;
@@ -237,6 +236,10 @@
                return $titles;
        }
 
+       public function getModulePath() {
+               return array( 'query', $this->getModuleName() );
+       }
+
        public function getCacheMode( $params ) {
                return 'anon-public-user-private';
        }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I41cd540c3faa4de0be3da5e619c0f9c9cdeb2b05
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Robmoen <[email protected]>

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

Reply via email to