Jhobs has uploaded a new change for review.

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

Change subject: Prepare Wikidata descriptions for rollout to stable
......................................................................

Prepare Wikidata descriptions for rollout to stable

* Move header html from SkinMinervaBeta to SkinMinerva
* Remove references to isBeta in parser output and README

Bug: T127250
Change-Id: I5fbadbc0d3d01ad4c84a8f921360de941837c797
---
M README.md
M includes/MobileFrontend.hooks.php
M includes/skins/SkinMinerva.php
M includes/skins/SkinMinervaBeta.php
4 files changed, 17 insertions(+), 22 deletions(-)


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

diff --git a/README.md b/README.md
index 0b59fbb..d1910f9 100644
--- a/README.md
+++ b/README.md
@@ -519,8 +519,7 @@
 Default: 0;
 
 ##### $wgMFUseWikibaseDescription
-If set to true and running beta, will add Wikidata description to page JS as
-wgMFDescription variable
+If set to true, will add Wikidata description to page JS as wgMFDescription 
variable
 
 Type: Boolean
 Default: false;
diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index 797bf57..b395d75 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -1267,7 +1267,7 @@
                        $outputPage->enableTOC( false );
                        $outputPage->setProperty( 'MFTOC', $po->getTOCHTML() 
!== '' );
 
-                       if ( $mfUseWikibaseDescription && $isBeta ) {
+                       if ( $mfUseWikibaseDescription ) {
                                $item = $po->getProperty( 'wikibase_item' );
                                if ( $item ) {
                                        $desc = 
ExtMobileFrontend::getWikibaseDescription( $item );
diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 2a52319..ca478d2 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -625,9 +625,22 @@
                                );
                        }
                } else {
-                       $title = $this->getOutput()->getPageTitle();
+                       $title = $this->getTitle();
                        if ( $title ) {
-                               $html = Html::rawElement( 'h1', [ 'id' => 
'section_0' ], $title );
+                               $html = Html::rawElement( 'h1',
+                                       [
+                                               'id' => 'section_0',
+                                       ], $title );
+                               if ( !$title->isMainPage() && 
$title->inNamespace( NS_MAIN ) ) {
+                                       $vars = $this->getSkinConfigVariables();
+                                       $description = $vars['wgMFDescription'];
+                                       if ( $description ) {
+                                               $html .= Html::element( 'div',
+                                                       [
+                                                               'class' => 
'tagline',
+                                                       ], $description );
+                                       }
+                               }
                        }
                }
                return $html;
diff --git a/includes/skins/SkinMinervaBeta.php 
b/includes/skins/SkinMinervaBeta.php
index e47b0d9..e305ddd 100644
--- a/includes/skins/SkinMinervaBeta.php
+++ b/includes/skins/SkinMinervaBeta.php
@@ -14,23 +14,6 @@
        /** @inheritdoc */
        protected $shouldSecondaryActionsIncludeLanguageBtn = false;
 
-       /** @inheritdoc **/
-       protected function getHeadingHtml() {
-               $html = parent::getHeadingHtml();
-               $title = $this->getTitle();
-               if ( !$title->isMainPage() && $title->inNamespace( NS_MAIN ) ) {
-                       $vars = $this->getSkinConfigVariables();
-                       $description = $vars['wgMFDescription'];
-                       if ( $description ) {
-                               $html .= Html::element( 'div',
-                                       [
-                                               'class' => 'tagline',
-                                       ], $description );
-                       }
-               }
-               return $html;
-       }
-
        /**
         * Do not set page actions on the user page that hasn't been created 
yet.
         * Also add the language switcher action.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5fbadbc0d3d01ad4c84a8f921360de941837c797
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jhobs <jhob...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to