jenkins-bot has submitted this change and it was merged. Change subject: Remove superfluous GetMobileNotice call. ......................................................................
Remove superfluous GetMobileNotice call. * Currently, GetMobileNotice gets called twice instead of once. * This change will make it so that GetMobileNotice is only called once, from the WML context. It also removes some effectively dead code in a template view. * This change can be implemented independently. * Change 69336 may result in GetMobileNotice becoming the definitive banner generation hook (instead of the current split between MinervaPreRender and GetMobileNotice), although to be functional it will need to give the callee full control over the banners array at the last possible moment (similar to MinervaPreRender). Discussion is underway on change 69336. Change-Id: I151858a632fbd3456f38d2c28e512e959bd5a757 --- M includes/skins/SkinMinerva.php M includes/skins/SkinMobile.php 2 files changed, 0 insertions(+), 5 deletions(-) Approvals: MaxSem: Looks good to me, approved Jdlrobson: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php index 9403b7d..3009877 100644 --- a/includes/skins/SkinMinerva.php +++ b/includes/skins/SkinMinerva.php @@ -69,9 +69,6 @@ $tpl->set( 'userButton', '<ul id="mw-mf-menu-page"></ul>' ); $banners = array(); - if ( isset( $tpl->data['notice'] ) ) { - $banners[] = $tpl->data['notice']; - } if ( $wgMFEnableSiteNotice ) { $banners[] = '<div id="siteNotice"></div>'; } diff --git a/includes/skins/SkinMobile.php b/includes/skins/SkinMobile.php index 77ae426..11dbe51 100644 --- a/includes/skins/SkinMobile.php +++ b/includes/skins/SkinMobile.php @@ -47,8 +47,6 @@ $tpl->set( 'headelement', $out->headElement( $this ) ); $tpl->set( 'bodytext', $html ); $notice = ''; - wfRunHooks( 'GetMobileNotice', array( $this, &$notice ) ); - $tpl->set( 'notice', $notice ); $tpl->set( 'reporttime', wfReportTime() ); $tpl->execute(); wfProfileOut( __METHOD__ . '-tpl' ); -- To view, visit https://gerrit.wikimedia.org/r/71710 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I151858a632fbd3456f38d2c28e512e959bd5a757 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Dr0ptp4kt <ab...@wikimedia.org> Gerrit-Reviewer: Dr0ptp4kt <ab...@wikimedia.org> Gerrit-Reviewer: Jdlrobson <jrob...@wikimedia.org> Gerrit-Reviewer: MaxSem <maxsem.w...@gmail.com> Gerrit-Reviewer: Yurik <yu...@wikimedia.org> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits