jenkins-bot has submitted this change and it was merged.

Change subject: Fix handling of iwdata=only in Special UnconnectedPages
......................................................................


Fix handling of iwdata=only in Special UnconnectedPages

Succession links did not include the name-value pair iwdata=only
and due to this would change behavior when the user clicked on
those links. This patchset changes that behavior and properly
add those pairs.

Change-Id: I1f466e3ebe7882441998e93fc7fdbceb2f22beb8
---
M client/includes/specials/SpecialUnconnectedPages.php
M lib/includes/specials/SpecialWikibaseQueryPage.php
2 files changed, 10 insertions(+), 3 deletions(-)

Approvals:
  Jeroen De Dauw: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/client/includes/specials/SpecialUnconnectedPages.php 
b/client/includes/specials/SpecialUnconnectedPages.php
index d90852d..10a0461 100644
--- a/client/includes/specials/SpecialUnconnectedPages.php
+++ b/client/includes/specials/SpecialUnconnectedPages.php
@@ -151,7 +151,12 @@
                . Html::closeElement( 'form' );
                $output->addHTML( $out );
 
-               $this->showQuery();
+               $query = array();
+               if ( $this->iwData === 'only' ) {
+                       $query['iwdata'] = $this->iwData;
+               }
+
+               $this->showQuery( $query );
        }
 
        /**
diff --git a/lib/includes/specials/SpecialWikibaseQueryPage.php 
b/lib/includes/specials/SpecialWikibaseQueryPage.php
index b92268e..ec1a2fa 100644
--- a/lib/includes/specials/SpecialWikibaseQueryPage.php
+++ b/lib/includes/specials/SpecialWikibaseQueryPage.php
@@ -85,9 +85,11 @@
        /**
         * Output the query result
         *
+        * @param array $query optional array of URL query parameter strings
+        *
         * @since 0.3
         */
-       protected function showQuery() {
+       protected function showQuery( array $query = array() ) {
                $out = $this->getOutput();
 
                if ( $this->limit == 0 && $this->offset == 0 ) {
@@ -107,7 +109,7 @@
                                $this->offset + 1 )->parseAsBlock() );
                        // Disable the "next" link when we reach the end
                        $paging = $this->getLanguage()->viewPrevNext( 
$this->getTitleForNavigation(), $this->offset,
-                               $this->limit, array(), ( $this->numRows <= 
$this->limit ) );
+                               $this->limit, $query, ( $this->numRows <= 
$this->limit ) );
                        $out->addHTML( Html::rawElement( 'p', array(), $paging 
) );
                } else {
                        // No results to show, so don't bother with "showing X 
of Y" etc.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1f466e3ebe7882441998e93fc7fdbceb2f22beb8
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: John Erling Blad <[email protected]>
Gerrit-Reviewer: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to