Mwalker has submitted this change and it was merged.

Change subject: Replace usage of SpecialPage::getTitle with getPageTitle
......................................................................


Replace usage of SpecialPage::getTitle with getPageTitle

Was deprecated in 1.23, see Icdcf5d5295ef5e7f08b1d403e0c123f78738fd40

Change-Id: Icb1dca1b63365bdc7a5c948c5b2761ea563b045d
---
M special/SpecialCentralNotice.php
M special/SpecialCentralNoticeBanners.php
2 files changed, 9 insertions(+), 9 deletions(-)

Approvals:
  Mwalker: Looks good to me, approved



diff --git a/special/SpecialCentralNotice.php b/special/SpecialCentralNotice.php
index 84872cd..6eea3b3 100644
--- a/special/SpecialCentralNotice.php
+++ b/special/SpecialCentralNotice.php
@@ -169,7 +169,7 @@
 
                                // If there were no errors, reload the page to 
prevent duplicate form submission
                                if ( !$this->centralNoticeError ) {
-                                       $out->redirect( 
$this->getTitle()->getLocalUrl() );
+                                       $out->redirect( 
$this->getPageTitle()->getLocalUrl() );
                                        return;
                                }
                        } else {
@@ -406,7 +406,7 @@
                                // Name
                                $rowCells .= Html::rawElement( 'td', array(),
                                        Linker::link(
-                                               $this->getTitle(),
+                                               $this->getPageTitle(),
                                                htmlspecialchars( 
$row->not_name ),
                                                array(),
                                                array(
@@ -551,7 +551,7 @@
                        // Form for adding a campaign
                        $htmlOut .= Xml::openElement( 'form', array( 'method' 
=> 'post' ) );
                        $htmlOut .= Xml::element( 'h2', null, $this->msg( 
'centralnotice-add-notice' )->text() );
-                       $htmlOut .= Html::hidden( 'title', 
$this->getTitle()->getPrefixedText() );
+                       $htmlOut .= Html::hidden( 'title', 
$this->getPageTitle()->getPrefixedText() );
                        $htmlOut .= Html::hidden( 'method', 'addCampaign' );
 
                        $htmlOut .= Xml::openElement( 'table', array( 
'cellpadding' => 9 ) );
@@ -805,7 +805,7 @@
 
                                        // If there were no errors, reload the 
page to prevent duplicate form submission
                                        if ( !$this->centralNoticeError ) {
-                                               $this->getOutput()->redirect( 
$this->getTitle()->getLocalUrl( array(
+                                               $this->getOutput()->redirect( 
$this->getPageTitle()->getLocalUrl( array(
                                                                'method' => 
'listNoticeDetail',
                                                                'notice' => 
$notice
                                                ) ) );
@@ -826,7 +826,7 @@
                        $htmlOut .= Xml::openElement( 'form',
                                array(
                                        'method' => 'post',
-                                       'action' => 
$this->getTitle()->getLocalUrl( array(
+                                       'action' => 
$this->getPageTitle()->getLocalUrl( array(
                                                'method' => 'listNoticeDetail',
                                                'notice' => $notice
                                        ) )
diff --git a/special/SpecialCentralNoticeBanners.php 
b/special/SpecialCentralNoticeBanners.php
index 0ea9222..22a76f2 100644
--- a/special/SpecialCentralNoticeBanners.php
+++ b/special/SpecialCentralNoticeBanners.php
@@ -191,7 +191,7 @@
 
                // --- Add all the banners via the fancy pager object ---
                $pager = new CNBannerPager(
-                       $this->getTitle(),
+                       $this->getPageTitle(),
                        'banner-list',
                        array(
                                 'applyTo' => array(
@@ -496,7 +496,7 @@
                                        'class' => 'HTMLInfoField',
                                        'disabled' => !$this->editable,
                                        'label-raw' => Linker::link(
-                                                       $this->getTitle( 
"preview/{$this->bannerName}" ),
+                                                       $this->getPageTitle( 
"preview/{$this->bannerName}" ),
                                                        $this->msg( 
'centralnotice-preview-all-template-translations' )->escaped()
                                                ),
                                        'default' => implode( ', ', 
$liveMessageNames ),
@@ -665,7 +665,7 @@
                                }
                                try {
                                        Banner::removeTemplate( 
$this->bannerName, $this->getUser() );
-                                       $this->getOutput()->redirect( 
$this->getTitle( '' )->getCanonicalURL() );
+                                       $this->getOutput()->redirect( 
$this->getPageTitle( '' )->getCanonicalURL() );
                                        $this->bannerFormRedirectRequired = 
true;
                                } catch ( MWException $ex ) {
                                        return $ex->getMessage() . " <br /> " . 
$this->msg( 'centralnotice-template-still-bound', $this->bannerName );
@@ -686,7 +686,7 @@
                                $newBannerName = $formData[ 'cloneName' ];
                                Banner::fromName( $this->bannerName 
)->cloneBanner( $newBannerName, $this->getUser() );
                                $this->getOutput()->redirect(
-                                       $this->getTitle( "Edit/$newBannerName" 
)->getCanonicalURL()
+                                       $this->getPageTitle( 
"Edit/$newBannerName" )->getCanonicalURL()
                                );
                                $this->bannerFormRedirectRequired = true;
                                break;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icb1dca1b63365bdc7a5c948c5b2761ea563b045d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: Mwalker <mwal...@wikimedia.org>
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