Florianschmidtwelzow has uploaded a new change for review.

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

Change subject: Follow up I20e46165fb7695
......................................................................

Follow up I20e46165fb7695

- The SkinPreloadExistence hook mentions the first parameter to be an array
  and passed by reference
- unset can take multiple variables in one call

Change-Id: I002c72b5c1882bd9d025ade1fb795e6803bcf65e
---
M includes/MobileFrontend.hooks.php
M includes/MobileFrontend.skin.hooks.php
2 files changed, 2 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/53/244753/1

diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index 0be5e30..4c17e4d 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -318,7 +318,7 @@
         * @param Skin $skin
         * @return bool
         */
-       public static function onSkinPreloadExistence( $titles, $skin ) {
+       public static function onSkinPreloadExistence( array &$titles, Skin 
$skin ) {
                $context = MobileContext::singleton();
                if ( $context->shouldDisplayMobileView() ) {
                        $skin->getOutput()->setTarget( 'mobile' );
diff --git a/includes/MobileFrontend.skin.hooks.php 
b/includes/MobileFrontend.skin.hooks.php
index 288850f..ee9848f 100644
--- a/includes/MobileFrontend.skin.hooks.php
+++ b/includes/MobileFrontend.skin.hooks.php
@@ -133,8 +133,7 @@
                $footerlinks = $tpl->data['footerlinks'];
                $args = $req->getQueryValues();
                // avoid title being set twice
-               unset( $args['title'] );
-               unset( $args['useformat'] );
+               unset( $args['title'], $args['useformat'] );
                $args['mobileaction'] = 'toggle_view_mobile';
 
                $mobileViewUrl = $title->getFullURL( $args );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I002c72b5c1882bd9d025ade1fb795e6803bcf65e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <[email protected]>

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

Reply via email to