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

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(-)

Approvals:
  Jdlrobson: Looks good to me, approved
  jenkins-bot: Verified



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: merged
Gerrit-Change-Id: I002c72b5c1882bd9d025ade1fb795e6803bcf65e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to