jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/333809 )

Change subject: Remove unused wgSupress* globals and duplicate heading
......................................................................


Remove unused wgSupress* globals and duplicate heading

Bug: T143145
Change-Id: I28ad3f0a32691ed6d77cc42a5034326427c461f4
---
M BlogPageClass.php
M BlogPageHooks.php
M SpecialArticleLists.php
M SpecialArticlesHome.php
M extension.json
M resources/css/ext.blogpage.articleshome.css
M resources/css/ext.blogpage.blogpage.css
7 files changed, 14 insertions(+), 28 deletions(-)

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



diff --git a/BlogPageClass.php b/BlogPageClass.php
index 6ca8191..eb480e2 100644
--- a/BlogPageClass.php
+++ b/BlogPageClass.php
@@ -66,9 +66,6 @@
 
                wfDebugLog( 'BlogPage', __METHOD__ );
 
-               $output->setHTMLTitle( $this->getTitle()->getText() );
-               $output->setPageTitle( $this->getTitle()->getText() );
-
                // Don't throw a bunch of E_NOTICEs when we're viewing the page 
of a
                // nonexistent blog post
                if ( !$this->getID() ) {
@@ -111,12 +108,21 @@
                $output->addHTML( "\t\t\t" . '</div><!-- #blog-page-left -->' . 
"\n" );
 
                $output->addHTML( '<div id="blog-page-middle">' . "\n" );
-               $output->addHTML( "<h1 
class=\"page-title\">{$this->getTitle()->getText()}</h1>\n" );
                $output->addHTML( $this->getByLine() );
 
                $output->addHTML( "\n<!--start Article::view-->\n" );
                parent::view();
 
+               /**
+                * The page title is being set here before the Article::view()
+                * call above, which overrides whatever we set if we set the 
title
+                * above that line.
+                *
+                * @see https://phabricator.wikimedia.org/T143145
+                */
+               $output->setHTMLTitle( $this->getTitle()->getText() );
+               $output->setPageTitle( $this->getTitle()->getText() );
+
                // Get categories
                $cat = $sk->getCategoryLinks();
                if ( $cat ) {
diff --git a/BlogPageHooks.php b/BlogPageHooks.php
index 559e0ce..5568fbf 100644
--- a/BlogPageHooks.php
+++ b/BlogPageHooks.php
@@ -16,16 +16,9 @@
         * @return bool
         */
        public static function blogFromTitle( &$title, &$article ) {
-               global $wgHooks, $wgOut, $wgRequest, $wgSupressPageTitle, 
$wgSupressSubTitle, $wgSupressPageCategories;
+               global $wgHooks, $wgOut;
 
                if ( $title->getNamespace() == NS_BLOG ) {
-                       if ( !$wgRequest->getVal( 'action' ) ) {
-                               $wgSupressPageTitle = true;
-                       }
-
-                       $wgSupressSubTitle = true;
-                       $wgSupressPageCategories = true;
-
                        // This will suppress category links in 
SkinTemplate-based skins
                        $wgHooks['SkinTemplateOutputPageBeforeExec'][] = 
function( $sk, $tpl ) {
                                $tpl->set( 'catlinks', '' );
diff --git a/SpecialArticleLists.php b/SpecialArticleLists.php
index cffe104..4d5f4d3 100644
--- a/SpecialArticleLists.php
+++ b/SpecialArticleLists.php
@@ -41,8 +41,6 @@
 
                $output = '<div class="left-articles">';
                if ( !$this->including() ) {
-                       $output .= '<h2>' . $this->msg( 'ah-new-articles' 
)->escaped() . '</h2>';
-
                        $descMsg = $this->msg( 'ah-new-articles-summary' );
                        if ( !$descMsg->isDisabled() ) {
                                $output .= Xml::tags('div', array(
diff --git a/SpecialArticlesHome.php b/SpecialArticlesHome.php
index 608149c..a69af2e 100644
--- a/SpecialArticlesHome.php
+++ b/SpecialArticlesHome.php
@@ -25,9 +25,7 @@
         * @param string $type What kind of articles to show? Default is 
'popular'
         */
        public function execute( $type ) {
-               global $wgContLang, $wgSupressPageTitle;
-
-               $wgSupressPageTitle = true;
+               global $wgContLang;
 
                $out = $this->getOutput();
                // Add CSS
@@ -63,7 +61,6 @@
                // Start building the HTML output
                $output = '<div class="main-page-left">';
                $output .= '<div class="logged-in-articles">';
-               $output .= '<h2>' . $name->escaped() . '</h2>';
                $output .= '<p class="main-page-sub-links"><a href="' .
                        htmlspecialchars( SpecialPage::getTitleFor( 
'CreateBlogPost' )->getFullURL() ) . '">' .
                        $this->msg( 'ah-write-article' )->escaped() . '</a> - 
<a href="' .
@@ -717,4 +714,4 @@
 
                return $output;
        }
-}
\ No newline at end of file
+}
diff --git a/extension.json b/extension.json
index 3e60254..8c03fee 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
        "name": "BlogPage",
-       "version": "2.4.4",
+       "version": "2.4.5",
        "author": [
                "David Pean",
                "Jack Phoenix"
diff --git a/resources/css/ext.blogpage.articleshome.css 
b/resources/css/ext.blogpage.articleshome.css
index d1628eb..d532da2 100644
--- a/resources/css/ext.blogpage.articleshome.css
+++ b/resources/css/ext.blogpage.articleshome.css
@@ -1,8 +1,4 @@
 /* Articles Home */
-h1.firstHeading {
-       display: none;
-}
-
 #main {
        padding: 0 !important;
 }
diff --git a/resources/css/ext.blogpage.blogpage.css 
b/resources/css/ext.blogpage.blogpage.css
index a7819c9..a396224 100644
--- a/resources/css/ext.blogpage.blogpage.css
+++ b/resources/css/ext.blogpage.blogpage.css
@@ -1,7 +1,3 @@
-h1.firstHeading {
-       display: none;
-}
-
 #main {
        padding: 0 !important;
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I28ad3f0a32691ed6d77cc42a5034326427c461f4
Gerrit-PatchSet: 8
Gerrit-Project: mediawiki/extensions/BlogPage
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen <samanthanguyen1...@gmail.com>
Gerrit-Reviewer: Jack Phoenix <j...@countervandalism.net>
Gerrit-Reviewer: Lewis Cawte <le...@lewiscawte.me>
Gerrit-Reviewer: SamanthaNguyen <samanthanguyen1...@gmail.com>
Gerrit-Reviewer: UltrasonicNXT <adamr_car...@btinternet.com>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to