Bartosz Dziewoński 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: Ieb0abc5119b2dd2727ad2c84d9bea254823c2f3e
---
M Poll_body.php
1 file changed, 40 insertions(+), 40 deletions(-)

Approvals:
  Bartosz Dziewoński: Verified; Looks good to me, approved



diff --git a/Poll_body.php b/Poll_body.php
index 2812450..bb2c561 100644
--- a/Poll_body.php
+++ b/Poll_body.php
@@ -29,7 +29,7 @@
                # Blocked users can't use this except to list
                if ( $userObject->isBlocked() && $action != 'list' ) {
                        $output->addWikiMsg( 'poll-create-block-error' );
-                       $output->addHtml( Linker::linkKnown( $this->getTitle(), 
wfMessage( 'poll-back' )->escaped(), array(), array( 'action' => 'list' ) ) );
+                       $output->addHtml( Linker::linkKnown( 
$this->getPageTitle(), wfMessage( 'poll-back' )->escaped(), array(), array( 
'action' => 'list' ) ) );
                        return;
                }
 
@@ -103,9 +103,9 @@
                $query = $dbr->select( 'poll', 'question, dis, id', array( 
'end' => 0 ) );
 
                $output->addHtml( Html::openElement( 'ul' ) );
-               $output->addHtml( Html::rawElement( 'li', array(), 
Linker::linkKnown( $this->getTitle(), wfMessage( 'poll-create-link' 
)->escaped(),
+               $output->addHtml( Html::rawElement( 'li', array(), 
Linker::linkKnown( $this->getPageTitle(), wfMessage( 'poll-create-link' 
)->escaped(),
                        array(), array( 'action' => 'create' ) ) ) );
-               $output->addHtml( Html::rawElement( 'li', array(), 
Linker::linkKnown( $this->getTitle(), wfMessage( 'poll-list-old' )->escaped(),
+               $output->addHtml( Html::rawElement( 'li', array(), 
Linker::linkKnown( $this->getPageTitle(), wfMessage( 'poll-list-old' 
)->escaped(),
                        array(), array( 'action' => 'list_old' ) ) ) );
                $output->addHtml( Html::closeElement( 'ul' ) );
 
@@ -120,10 +120,10 @@
 
                while ( $row = $dbr->fetchObject( $query ) ) {
                        $tableRow = array();
-                       $tableRow[] = Linker::linkKnown( $this->getTitle(), 
htmlentities( $row->question, ENT_QUOTES, "UTF-8" ), array(),
+                       $tableRow[] = Linker::linkKnown( $this->getPageTitle(), 
htmlentities( $row->question, ENT_QUOTES, "UTF-8" ), array(),
                                array( 'action' => 'vote', 'id' => $row->id ) );
                        $tableRow[] = htmlentities( $row->dis, ENT_QUOTES, 
"UTF-8" );
-                       $tableRow[] = Linker::linkKnown( $this->getTitle(), 
wfMessage( 'poll-title-score' )->escaped(), array(),
+                       $tableRow[] = Linker::linkKnown( $this->getPageTitle(), 
wfMessage( 'poll-title-score' )->escaped(), array(),
                                array( 'action' => 'score', 'id' => $row->id ) 
);
 
                        $tableRows[] = $tableRow;
@@ -150,9 +150,9 @@
                $query = $dbr->select( 'poll', 'question, dis, id', array( 
'end' => 1 ), __METHOD__, array( 'ORDER BY' => 'id DESC', 'LIMIT' => $limit ) );
 
                $output->addHtml( Html::openElement( 'ul' ) );
-               $output->addHtml( Html::rawElement( 'li', array(), 
Linker::linkKnown( $this->getTitle(), wfMessage( 'poll-create-link' 
)->escaped(),
+               $output->addHtml( Html::rawElement( 'li', array(), 
Linker::linkKnown( $this->getPageTitle(), wfMessage( 'poll-create-link' 
)->escaped(),
                        array(), array( 'action' => 'create' ) ) ) );
-               $output->addHtml( Html::rawElement( 'li', array(), 
Linker::linkKnown( $this->getTitle(), wfMessage( 'poll-list-current' 
)->escaped(),
+               $output->addHtml( Html::rawElement( 'li', array(), 
Linker::linkKnown( $this->getPageTitle(), wfMessage( 'poll-list-current' 
)->escaped(),
                        array(), array( 'action' => 'list' ) ) ) );
                $output->addHtml( Html::closeElement( 'ul' ) );
 
@@ -166,7 +166,7 @@
 
                while ( $row = $dbr->fetchObject( $query ) ) {
                        $tableRow = array();
-                       $tableRow[] = Linker::linkKnown( $this->getTitle(), 
htmlentities( $row->question, ENT_QUOTES, "UTF-8" ), array(),
+                       $tableRow[] = Linker::linkKnown( $this->getPageTitle(), 
htmlentities( $row->question, ENT_QUOTES, "UTF-8" ), array(),
                                array( 'action' => 'score', 'id' => $row->id ) 
);
                        $tableRow[] = htmlentities( $row->dis, ENT_QUOTES, 
"UTF-8" );
                }
@@ -184,7 +184,7 @@
 
                if ( !$userObject->isAllowed( 'poll-create' ) ) {
                        $output->addWikiMsg( 'poll-create-right-error' );
-                       $output->addHtml( Linker::linkKnown( $this->getTitle(), 
wfMessage( 'poll-back' )->escaped(),
+                       $output->addHtml( Linker::linkKnown( 
$this->getPageTitle(), wfMessage( 'poll-back' )->escaped(),
                                array(), array( 'action' => 'list' ) ) );
                } else {
                        $user = $userObject->getID();
@@ -193,7 +193,7 @@
 
                        $formFields = array();
 
-                       $output->addHtml( Xml::openElement( 'form', array( 
'method' => 'post', 'action' => $this->getTitle()->getFullURL( 'action=submit' 
) ) ) );
+                       $output->addHtml( Xml::openElement( 'form', array( 
'method' => 'post', 'action' => $this->getPageTitle()->getFullURL( 
'action=submit' ) ) ) );
 
                        $runtimeSelect = new XmlSelect( 'runtime', 'runtime' );
                        $runtimeSelect->setAttribute( 'size', '1' );
@@ -232,7 +232,7 @@
 
                if ( !$userObject->isAllowed( 'poll-vote' ) ) {
                        $output->addWikiMsg( 'poll-vote-right-error' );
-                       $output->addHtml( Linker::linkKnown( $this->getTitle(), 
wfMessage( 'poll-back' )->escaped(),
+                       $output->addHtml( Linker::linkKnown( 
$this->getPageTitle(), wfMessage( 'poll-back' )->escaped(),
                                array(), array( 'action' => 'list' ) ) );
                }
                else {
@@ -254,12 +254,12 @@
 
                        if ( !isset( $question ) OR $question == "" ) {
                                $output->addWikiMsg( 'poll-invalid-id' );
-                               $output->addHtml( Linker::linkKnown( 
$this->getTitle(), wfMessage( 'poll-back' )->escaped(),
+                               $output->addHtml( Linker::linkKnown( 
$this->getPageTitle(), wfMessage( 'poll-back' )->escaped(),
                                        array(), array( 'action' => 'list' ) ) 
);
                                return;
                        }
 
-                       $output->addHtml( Xml::openElement( 'form', array( 
'method' => 'post', 'action' => $this->getTitle()->getFullURL( 
'action=submit&id=' . $vid ) ) ) );
+                       $output->addHtml( Xml::openElement( 'form', array( 
'method' => 'post', 'action' => $this->getPageTitle()->getFullURL( 
'action=submit&id=' . $vid ) ) ) );
 
                        $tableRows = array();
                        $tableHeaders = array();
@@ -285,7 +285,7 @@
                                $tableRows[] = array( Xml::inputLabel( 
wfMessage( 'poll-vote-other' )->escaped(), 'vote_other', 'vote_other' ) );
                        }
 
-                       $tableRows[] = array( Xml::submitButton( wfMessage( 
'poll-submit' )->escaped() ) . ' ' . Linker::linkKnown( $this->getTitle(),
+                       $tableRows[] = array( Xml::submitButton( wfMessage( 
'poll-submit' )->escaped() ) . ' ' . Linker::linkKnown( 
$this->getPageTitle(),
                                wfMessage( 'poll-title-score' )->escaped(), 
array(), array( 'action' => 'score', 'id' => $vid ) ) );
 
                        $output->addHtml( self::buildTable( $tableRows, 
array(), $tableHeaders ) );
@@ -297,9 +297,9 @@
                        $output->addHtml( Xml::closeElement( 'form' ) );
 
                        if ( $userObject->isAllowed( 'poll-admin' ) || ( 
$creater == $userObject->getName() ) ) {
-                               $output->addHtml( wfMessage( 
'poll-administration' )->escaped() . ' ' . Linker::linkKnown( 
$this->getTitle(),
+                               $output->addHtml( wfMessage( 
'poll-administration' )->escaped() . ' ' . Linker::linkKnown( 
$this->getPageTitle(),
                                        wfMessage( 'poll-change' )->escaped(), 
array(), array( 'action' => 'change', 'id' => $vid ) ) . ' · ' .
-                                       Linker::linkKnown( $this->getTitle(), 
wfMessage( 'poll-delete' )->escaped(), array(),
+                                       Linker::linkKnown( 
$this->getPageTitle(), wfMessage( 'poll-delete' )->escaped(), array(),
                                        array( 'action' => 'delete', 'id' => 
$vid ) ) );
                        }
                }
@@ -314,7 +314,7 @@
 
                if ( !$userObject->isAllowed( 'poll-score' ) ) {
                        $output->addWikiMsg( 'poll-score-right-error' );
-                       $output->addHtml( Linker::linkKnown( $this->getTitle(), 
wfMessage( 'poll-back' )->escaped(),
+                       $output->addHtml( Linker::linkKnown( 
$this->getPageTitle(), wfMessage( 'poll-back' )->escaped(),
                                array(), array( 'action' => 'list' ) ) );
                }
                else {
@@ -336,7 +336,7 @@
 
                        if ( !isset( $question ) OR $question == "" ) {
                                $output->addWikiMsg( 'poll-invalid-id' );
-                               $output->addHtml( Linker::linkKnown( 
$this->getTitle(), wfMessage( 'poll-back' )->escaped(),
+                               $output->addHtml( Linker::linkKnown( 
$this->getPageTitle(), wfMessage( 'poll-back' )->escaped(),
                                        array(), array( 'action' => 'list' ) ) 
);
                                return;
                        }
@@ -408,7 +408,7 @@
 
                        $output->addHtml( self::buildTable( $tableRows, 
array(), $tableHeaders ) );
                        $output->addWikiText( '<small>' . wfMessage( 
'poll-score-created', $creater )->text() . '</small>' );
-                       $output->addHtml( Linker::linkKnown( $this->getTitle(), 
wfMessage( 'poll-back' )->escaped(),
+                       $output->addHtml( Linker::linkKnown( 
$this->getPageTitle(), wfMessage( 'poll-back' )->escaped(),
                                        array(), array( 'action' => 'list' ) ) 
);
                }
        }
@@ -427,15 +427,15 @@
                }
 
                if ( isset( $question ) && $question != "" ) {
-                       $output->addHtml( Xml::openElement( 'form', array( 
'method' => 'post', 'action' => $this->getTitle()->getFullURL( 
'action=submit&id=' . $did ) ) ) );
+                       $output->addHtml( Xml::openElement( 'form', array( 
'method' => 'post', 'action' => $this->getPageTitle()->getFullURL( 
'action=submit&id=' . $did ) ) ) );
                        $output->addHtml( Xml::checkLabel( wfMessage( 
'poll-delete-question', $question )->text(), 'controll_delete', 
'controll_delete' ) . '<br />' ); # text() because Xml::element escapes another 
time
                        $output->addHtml( Xml::submitButton( wfMessage( 
'poll-submit' )->escaped() ) . '&#160;' .
-                               Linker::linkKnown( $this->getTitle(), 
wfMessage( 'poll-back' )->escaped(), array(), array( 'action' => 'list' ) ) );
+                               Linker::linkKnown( $this->getPageTitle(), 
wfMessage( 'poll-back' )->escaped(), array(), array( 'action' => 'list' ) ) );
                        $output->addHtml( Html::Hidden( 'type', 'delete' ) );
                        $output->addHtml( Xml::closeElement( 'form' ) );
                } else {
                        $output->addWikiMsg( 'poll-invalid-id' );
-                       $output->addHtml( Linker::linkKnown( $this->getTitle(), 
wfMessage( 'poll-back' )->escaped(),
+                       $output->addHtml( Linker::linkKnown( 
$this->getPageTitle(), wfMessage( 'poll-back' )->escaped(),
                                array(), array( 'action' => 'list' ) ) );
                }
        }
@@ -464,12 +464,12 @@
 
                if ( !isset( $question ) OR $question == "" ) {
                        $output->addWikiMsg( 'poll-invalid-id' );
-                       $output->addHtml( Linker::linkKnown( $this->getTitle(), 
wfMessage( 'poll-back' )->escaped(),
+                       $output->addHtml( Linker::linkKnown( 
$this->getPageTitle(), wfMessage( 'poll-back' )->escaped(),
                                array(), array( 'action' => 'list' ) ) );
                        return;
                }
                else {
-                       $output->addHtml( Xml::openElement( 'form', array( 
'method' => 'post', 'action' => $this->getTitle()->getFullURL( 
'action=submit&id=' . $cid ) ) ) );
+                       $output->addHtml( Xml::openElement( 'form', array( 
'method' => 'post', 'action' => $this->getPageTitle()->getFullURL( 
'action=submit&id=' . $cid ) ) ) );
 
                        $formFields = array();
                        $formFields['poll-question'] = Xml::input( 'question', 
false, $question );
@@ -498,7 +498,7 @@
                if ( $type == 'create' ) {
                        if ( !$userObject->isAllowed( 'poll-create' ) ) {
                                $output->addWikiMsg( 'poll-create-right-error' 
);
-                               $output->addHtml( Linker::linkKnown( 
$this->getTitle(), wfMessage( 'poll-back' )->escaped(),
+                               $output->addHtml( Linker::linkKnown( 
$this->getPageTitle(), wfMessage( 'poll-back' )->escaped(),
                                        array(), array( 'action' => 'list' ) ) 
);
                        }
                        else {
@@ -537,16 +537,16 @@
                                                'starttime' => time(), 
'runtime' => $runtime ), __METHOD__ );
 
                                        $log = new LogPage( "poll" );
-                                       $title = $this->getTitle();
+                                       $title = $this->getPageTitle();
                                        $log->addEntry( "create", $title, "", 
array( htmlentities( $question, ENT_QUOTES, 'UTF-8' ) ), $userObject );
 
                                        $output->addWikiMsg( 'poll-create-pass' 
);
-                                       $output->addHtml( Linker::linkKnown( 
$this->getTitle(), wfMessage( 'poll-back' )->escaped(),
+                                       $output->addHtml( Linker::linkKnown( 
$this->getPageTitle(), wfMessage( 'poll-back' )->escaped(),
                                                array(), array( 'action' => 
'list' ) ) );
                                }
                                else {
                                        $output->addWikiMsg( 
'poll-create-fields-error' );
-                                       $output->addHtml( Linker::linkKnown( 
$this->getTitle(), wfMessage( 'poll-back' )->escaped(),
+                                       $output->addHtml( Linker::linkKnown( 
$this->getPageTitle(), wfMessage( 'poll-back' )->escaped(),
                                                array(), array( 'action' => 
'list' ) ) );
                                }
                        }
@@ -555,7 +555,7 @@
                if ( $type == 'vote' ) {
                        if ( !$userObject->isAllowed( 'poll-vote' ) ) {
                                $output->addWikiMsg( 'poll-vote-right-error' );
-                               $output->addHtml( Linker::linkKnown( 
$this->getTitle(), wfMessage( 'poll-back' )->escaped(),
+                               $output->addHtml( Linker::linkKnown( 
$this->getPageTitle(), wfMessage( 'poll-back' )->escaped(),
                                        array(), array( 'action' => 'list' ) ) 
);
                        }
                        else {
@@ -572,7 +572,7 @@
 
                                if ( $uid == 0 && $ip == 0 ) {
                                        $output->addWikiMsg( 'poll-ip-error' );
-                                       $output->addHtml( Linker::linkKnown( 
$this->getTitle(), wfMessage( 'poll-back' )->escaped(),
+                                       $output->addHtml( Linker::linkKnown( 
$this->getPageTitle(), wfMessage( 'poll-back' )->escaped(),
                                                array(), array( 'action' => 
'list' ) ) );
                                        return;
                                }
@@ -618,7 +618,7 @@
 
                                if ( $vote == "err001" ) {
                                        $output->addWikiMsg( 
'poll-vote-empty-error' );
-                                       $output->addHtml( Linker::linkKnown( 
$this->getTitle(), wfMessage( 'poll-back' )->escaped(),
+                                       $output->addHtml( Linker::linkKnown( 
$this->getPageTitle(), wfMessage( 'poll-back' )->escaped(),
                                                array(), array( 'action' => 
'list' ) ) );
 
                                        return;
@@ -641,7 +641,7 @@
                                        }
 
                                        $output->addWikiMsg( 'poll-vote-pass' );
-                                       $output->addHtml( Linker::linkKnown( 
$this->getTitle(), wfMessage( 'poll-back' )->escaped(),
+                                       $output->addHtml( Linker::linkKnown( 
$this->getPageTitle(), wfMessage( 'poll-back' )->escaped(),
                                                array(), array( 'action' => 
'list' ) ) );
                                }
                                else {
@@ -653,7 +653,7 @@
                                                $dbw->update( 'poll_answer', 
array( 'vote' => $vote, 'isset_vote_other' => $isset_vote_other, 'vote_other' 
=> $vote_other ), array( 'uid' => $uid, 'pid' => $pid ) );
                                        }
                                        $output->addWikiMsg( 
'poll-vote-changed' );
-                                       $output->addHtml( Linker::linkKnown( 
$this->getTitle(), wfMessage( 'poll-back' )->escaped(),
+                                       $output->addHtml( Linker::linkKnown( 
$this->getPageTitle(), wfMessage( 'poll-back' )->escaped(),
                                                array(), array( 'action' => 
'list' ) ) );
                                }
                        }
@@ -669,7 +669,7 @@
 
                        if ( ( $creater != $userObject->getName() ) && 
!$userObject->isAllowed( 'poll-admin' ) ) {
                                $output->addWikiMsg( 'poll-change-right-error' 
);
-                               $output->addHtml( Linker::linkKnown( 
$this->getTitle(), wfMessage( 'poll-back' )->escaped(),
+                               $output->addHtml( Linker::linkKnown( 
$this->getPageTitle(), wfMessage( 'poll-back' )->escaped(),
                                        array(), array( 'action' => 'list' ) ) 
);
                                return;
                        }
@@ -704,11 +704,11 @@
                                        'alternative_6' => $alternative_6, 
'creater' => $user, 'dis' => $dis ), array( 'id' => $pid ) );
 
                                $log = new LogPage( "poll" );
-                               $title = $this->getTitle();
+                               $title = $this->getPageTitle();
                                $log->addEntry( "change", $title, "", array( 
htmlentities( $question, ENT_QUOTES, 'UTF-8' ) ), $userObject );
 
                                $output->addWikiMsg( 'poll-change-pass' );
-                               $output->addHtml( Linker::linkKnown( 
$this->getTitle(), wfMessage( 'poll-back' )->escaped(),
+                               $output->addHtml( Linker::linkKnown( 
$this->getPageTitle(), wfMessage( 'poll-back' )->escaped(),
                                        array(), array( 'action' => 'list' ) ) 
);
                        }
                }
@@ -724,7 +724,7 @@
 
                        if ( ( $creater != $userObject->getName() ) && 
!$userObject->isAllowed( 'poll-admin' ) ) {
                                $output->addWikiMsg( 'poll-delete-right-error' 
);
-                               $output->addHtml( Linker::linkKnown( 
$this->getTitle(), wfMessage( 'poll-back' )->escaped(),
+                               $output->addHtml( Linker::linkKnown( 
$this->getPageTitle(), wfMessage( 'poll-back' )->escaped(),
                                        array(), array( 'action' => 'list' ) ) 
);
                                return;
                        }
@@ -736,17 +736,17 @@
                                        $dbw->delete( 'poll_answer', array( 
'uid' => $pid ) );
 
                                        $log = new LogPage( "poll" );
-                                       $title = $this->getTitle();
+                                       $title = $this->getPageTitle();
                                        $log->addEntry( "delete", $title, "", 
array( htmlentities( $question, ENT_QUOTES, 'UTF-8' ) ), $userObject );
 
                                        $output->addWikiMsg( 'poll-delete-pass' 
);
 
-                                       $output->addHtml( Linker::linkKnown( 
$this->getTitle(), wfMessage( 'poll-back' )->escaped(),
+                                       $output->addHtml( Linker::linkKnown( 
$this->getPageTitle(), wfMessage( 'poll-back' )->escaped(),
                                                array(), array( 'action' => 
'list' ) ) );
                                }
                                else {
                                        $output->addWikiMsg( 
'poll-delete-cancel' );
-                                       $output->addHtml( Linker::linkKnown( 
$this->getTitle(), wfMessage( 'poll-back' )->escaped(),
+                                       $output->addHtml( Linker::linkKnown( 
$this->getPageTitle(), wfMessage( 'poll-back' )->escaped(),
                                                array(), array( 'action' => 
'list' ) ) );
                                }
                        }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieb0abc5119b2dd2727ad2c84d9bea254823c2f3e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Poll
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to