Jdlrobson has submitted this change and it was merged.
Change subject: Make site notice display in mobile configurable
......................................................................
Make site notice display in mobile configurable
Introduces wgMFEnableSiteNotice, which when set to true, will allow site
notices to be rendered in the mobile site.
Change-Id: Ib1cad5f167bf7f9ba7f9fe9a5f5b34cda833f37b
---
M MobileFrontend.php
M includes/skins/SkinMobile.php
M includes/skins/SkinMobileTemplate.php
3 files changed, 14 insertions(+), 2 deletions(-)
Approvals:
Jdlrobson: Verified; Looks good to me, approved
jenkins-bot: Checked
diff --git a/MobileFrontend.php b/MobileFrontend.php
index 07580a2..573a344 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -742,3 +742,9 @@
* (wiki)text to append to photo description during photo upload.
*/
$wgMFPhotoUploadAppendToDesc = '';
+
+/**
+ * Whether or not to display site notices
+ * @var bool
+ */
+$wgMFEnableSiteNotice = false;
diff --git a/includes/skins/SkinMobile.php b/includes/skins/SkinMobile.php
index 8574991..0a43a51 100644
--- a/includes/skins/SkinMobile.php
+++ b/includes/skins/SkinMobile.php
@@ -8,7 +8,8 @@
protected function prepareTemplate() {
global $wgAppleTouchIcon, $wgExtensionAssetsPath,
- $wgMFCustomLogos, $wgVersion,
$wgMFTrademarkSitename, $wgMFPhotoUploadEndpoint;
+ $wgMFCustomLogos, $wgVersion, $wgMFTrademarkSitename,
$wgMFPhotoUploadEndpoint,
+ $wgMFEnableSiteNotice;
wfProfileIn( __METHOD__ );
$tpl = parent::prepareTemplate();
@@ -58,6 +59,9 @@
// footer
$tpl->set( 'copyright', $this->getCopyright() );
+ // display site notice
+ $tpl->set( 'enableSiteNotice', $wgMFEnableSiteNotice );
+
$footerSitename = $this->msg( 'mobile-frontend-footer-sitename'
)->text();
if ( is_array( $wgMFCustomLogos ) && isset(
$wgMFCustomLogos['copyright'] ) ) {
if ( $wgMFTrademarkSitename ) {
diff --git a/includes/skins/SkinMobileTemplate.php
b/includes/skins/SkinMobileTemplate.php
index 2d45295..bae0a61 100644
--- a/includes/skins/SkinMobileTemplate.php
+++ b/includes/skins/SkinMobileTemplate.php
@@ -6,7 +6,9 @@
?>
<?php $this->html( 'zeroRatedBanner' ) ?>
<?php $this->html( 'notice' ) ?>
- <div id="siteNotice"></div>
+ <?php if ( $this->data[ 'enableSiteNotice' ] ) { ?>
+ <div id="siteNotice"></div>
+ <?php } ?>
<?php $this->renderArticleHeader() ?>
<div class='show <?php $this->html( 'articleClass' ); ?>'
id='content_wrapper'>
<?php if ( !$this->data[ 'isSpecialPage' ] ) { ?>
--
To view, visit https://gerrit.wikimedia.org/r/53601
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib1cad5f167bf7f9ba7f9fe9a5f5b34cda833f37b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: awjrichards <[email protected]>
Gerrit-Reviewer: Brion VIBBER <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: awjrichards <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits