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: If312f606e62d4721218a1239b3ecd4ead2513f02
---
M QuestionGameHome.body.php
M QuestionGameUpload.php
M QuizLeaderboard.php
M ViewQuizzes.php
4 files changed, 22 insertions(+), 22 deletions(-)

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



diff --git a/QuestionGameHome.body.php b/QuestionGameHome.body.php
index dc1c317..74f5486 100644
--- a/QuestionGameHome.body.php
+++ b/QuestionGameHome.body.php
@@ -45,7 +45,7 @@
                // permalink ID and forward the user to the question with that 
ID
                if( $permalink ) {
                        $out->redirect(
-                               $this->getTitle()->getFullURL(
+                               $this->getPageTitle()->getFullURL(
                                        
"questionGameAction=renderPermalink&permalinkID={$permalink}"
                                )
                        );
@@ -335,7 +335,7 @@
 
                        $key = md5( $this->SALT . $row->q_id );
                        $buttons = Linker::link(
-                               $this->getTitle(),
+                               $this->getPageTitle(),
                                $this->msg( 'quizgame-edit' )->text(),
                                array(),
                                array(
@@ -410,7 +410,7 @@
                                <div class="ajax-messages" id="ajax-messages" 
style="margin:0px 0px 15px 0px;"></div>
 
                                <div class="quizgame-admin-top-links">
-                                       <a href="' . 
$this->getTitle()->escapeFullURL( 'questionGameAction=launchGame' ) . '">' .
+                                       <a href="' . 
$this->getPageTitle()->escapeFullURL( 'questionGameAction=launchGame' ) . '">' .
                                                $this->msg( 
'quizgame-admin-back' )->text() . '</a>
                                </div>
 
@@ -549,7 +549,7 @@
                        $res = $dbw->query( $sql, __METHOD__ );
                }
 
-               header( 'Location: ' . $this->getTitle()->getFullURL( 
"renderPermalink&permalinkID={$id}" ) );
+               header( 'Location: ' . $this->getPageTitle()->getFullURL( 
"renderPermalink&permalinkID={$id}" ) );
        }
 
        /**
@@ -667,7 +667,7 @@
                $output .= "
                                <div class=\"quizgame-edit-question\" 
id=\"quizgame-edit-question\">
                                        <form name=\"quizGameEditForm\" 
id=\"quizGameEditForm\" method=\"post\" action=\"" .
-                                               
$this->getTitle()->escapeFullURL( 'questionGameAction=completeEdit' ) .
+                                               
$this->getPageTitle()->escapeFullURL( 'questionGameAction=completeEdit' ) .
                                                '">
 
                                                <div class="credit-box" 
id="creditBox">
@@ -729,7 +729,7 @@
                                <div class=\"quizgame-edit-buttons\" 
id=\"quizgame-edit-buttons\">
                                        <input type=\"button\" 
class=\"site-button\" value=\"" . $this->msg( 'quizgame-save-page-button' 
)->text() . "\" onclick=\"javascript:document.quizGameEditForm.submit()\"/>
                                        <input type=\"button\" 
class=\"site-button\" value=\"" . $this->msg( 'quizgame-cancel-button' 
)->text() . "\" onclick=\"javascript:document.location='" .
-                                               
$this->getTitle()->escapeFullURL( 'questionGameAction=launchGame' ) . '\'" />
+                                               
$this->getPageTitle()->escapeFullURL( 'questionGameAction=launchGame' ) . '\'" 
/>
                                </div>
                        </div>';
 
@@ -768,7 +768,7 @@
                $output .= '<div>
                <input type="button" class="site-button" value="' .
                        $this->msg( 'quizgame-create-button' )->text() . '" 
onclick="window.location=\'' .
-                       $this->getTitle()->escapeFullURL( 
'questionGameAction=createForm' ) .
+                       $this->getPageTitle()->escapeFullURL( 
'questionGameAction=createForm' ) .
                        '\'"/>
 
                </div>';
@@ -790,7 +790,7 @@
 
        function renderStart() {
                $this->getOutput()->setPageTitle( $this->msg( 'quizgame-title' 
)->text() );
-               $url = $this->getTitle()->escapeFullURL( 
'questionGameAction=launchGame' );
+               $url = $this->getPageTitle()->escapeFullURL( 
'questionGameAction=launchGame' );
                $output = $this->msg( 'quizgame-intro' )->parse() . '  <a 
href="' . $url . '">' .
                        $this->msg( 'quizgame-introlink' )->text() . '</a>';
                $this->getOutput()->addHTML( $output );
@@ -942,7 +942,7 @@
                                </div>";
 
                        $editLinks = Linker::link(
-                               $this->getTitle(),
+                               $this->getPageTitle(),
                                $this->msg( 'quizgame-admin-panel-title' 
)->text(),
                                array(),
                                array( 'questionGameAction' => 'adminPanel' )
@@ -1098,7 +1098,7 @@
                        $output .= '<a class="skip-question-link" 
href="javascript:void(0);">' .
                                $this->msg( 'quizgame-skip' )->text() . '</a>';
                } else {
-                       $output .= '<a href="' . 
$this->getTitle()->escapeFullURL( 'questionGameAction=launchGame' ) . '">' .
+                       $output .= '<a href="' . 
$this->getPageTitle()->escapeFullURL( 'questionGameAction=launchGame' ) . '">' .
                                $this->msg( 'quizgame-next' )->text() . '</a>';
                }
                $output .= '</div>';
@@ -1110,7 +1110,7 @@
 
                                                        <div 
class="last-question-heading">'
                                                                . $this->msg( 
'quizgame-last-question' )->text() . ' - <a href="' .
-                                                               
$this->getTitle()->escapeFullURL( 
"questionGameAction=renderPermalink&permalinkID={$prev_question['id']}" ) .
+                                                               
$this->getPageTitle()->escapeFullURL( 
"questionGameAction=renderPermalink&permalinkID={$prev_question['id']}" ) .
                                                                
"\">{$prev_question['text']}</a>
                                                                <div 
class=\"last-question-count\">" .
                                                                        
$this->msg( 'quizgame-times-answered', $prev_question['answer_count'] 
)->parse() .
@@ -1168,7 +1168,7 @@
 
                                        <div class=\"create-link\">
                                                <img border=\"0\" 
src=\"{$wgExtensionAssetsPath}/QuizGame/images/addIcon.gif\" alt=\"\" />
-                                               <a href=\"" . 
$this->getTitle()->escapeFullURL( 'questionGameAction=createForm' ) . '">'
+                                               <a href=\"" . 
$this->getPageTitle()->escapeFullURL( 'questionGameAction=createForm' ) . '">'
                                                        . $this->msg( 
'quizgame-create-title' )->text() .
                                                "</a>
                                        </div>
@@ -1209,7 +1209,7 @@
 
                // Protect & delete links for quiz administrators
                if ( $user->isAllowed( 'quizadmin' ) ) {
-                       $output .= '<a href="' . 
$this->getTitle()->escapeFullURL( 'questionGameAction=adminPanel' ) . '">'
+                       $output .= '<a href="' . 
$this->getPageTitle()->escapeFullURL( 'questionGameAction=adminPanel' ) . '">'
                                        . $this->msg( 
'quizgame-admin-panel-title' )->text() .
                                '</a> - <a class="protect-image-link" 
href="#">' .
                                        $this->msg( 'quizgame-protect' 
)->text() . '</a> - ' .
@@ -1218,7 +1218,7 @@
                }
 
                $output .= "<a href=\"javascript:document.location='" .
-                       $this->getTitle()->escapeFullURL( 
'questionGameAction=renderPermalink' ) .
+                       $this->getPageTitle()->escapeFullURL( 
'questionGameAction=renderPermalink' ) .
                        "&permalinkID=' + document.getElementById( 'quizGameId' 
).value\">" .
                                $this->msg( 'quizgame-permalink' )->text() . 
'</a>
 
@@ -1250,7 +1250,7 @@
                $max_answers = 8;
 
                if( $key != md5( $this->SALT . $chain ) ) {
-                       header( 'Location: ' . $this->getTitle()->getFullURL() 
);
+                       header( 'Location: ' . 
$this->getPageTitle()->getFullURL() );
                        return;
                }
 
@@ -1303,7 +1303,7 @@
                if( $wgQuizLogs ) {
                        $logEntry = new ManualLogEntry( 'quiz', 'create' );
                        $logEntry->setPerformer( $user );
-                       $logEntry->setTarget( $this->getTitle( $questionId ) );
+                       $logEntry->setTarget( $this->getPageTitle( $questionId 
) );
                        $logEntry->setParameters( array(
                                '4::quizid' => $questionId
                        ) );
@@ -1317,7 +1317,7 @@
                $wgMemc->delete( $key );
 
                // Redirect the user
-               header( 'Location: ' . $this->getTitle()->getFullURL( 
"questionGameAction=renderPermalink&permalinkID={$questionId}" ) );
+               header( 'Location: ' . $this->getPageTitle()->getFullURL( 
"questionGameAction=renderPermalink&permalinkID={$questionId}" ) );
        }
 
        function renderWelcomePage() {
@@ -1370,13 +1370,13 @@
                                <h1>' . $this->msg( 'quizgame-create-title' 
)->text() . '</h1>
                                <p>' . $this->msg( 'quizgame-create-message' 
)->parse() . '</p>
                                <p><input class="site-button" type="button" 
onclick="document.location=\'' .
-                                       $this->getTitle()->escapeFullURL( 
'questionGameAction=launchGame' ) .
+                                       $this->getPageTitle()->escapeFullURL( 
'questionGameAction=launchGame' ) .
                                        '\'" value="' . $this->msg( 
'quizgame-play-quiz' )->text() . '" /></p>
                        </div>
 
                        <div class="quizgame-create-form" 
id="quizgame-create-form">
                                <form id="quizGameCreate" name="quizGameCreate" 
method="post" action="' .
-                                       $this->getTitle()->escapeFullURL( 
'questionGameAction=createGame' ) . '">
+                                       $this->getPageTitle()->escapeFullURL( 
'questionGameAction=createGame' ) . '">
                                <div id="quiz-game-errors" 
style="color:red"></div>
 
                                <h1>' . $this->msg( 
'quizgame-create-write-question' )->text() . '</h1>
diff --git a/QuestionGameUpload.php b/QuestionGameUpload.php
index 4d07a7e..aa6e60b 100644
--- a/QuestionGameUpload.php
+++ b/QuestionGameUpload.php
@@ -151,7 +151,7 @@
                        'destwarningack' => (bool)$this->mDestWarningAck,
                        'destfile' => $this->mDesiredDestName,
                ) );
-               $form->setTitle( $this->getTitle() );
+               $form->setTitle( $this->getPageTitle() );
 
                # Check the token, but only if necessary
                if( !$this->mTokenOk && !$this->mCancelUpload
diff --git a/QuizLeaderboard.php b/QuizLeaderboard.php
index 60c3206..0ca9ab1 100644
--- a/QuizLeaderboard.php
+++ b/QuizLeaderboard.php
@@ -115,7 +115,7 @@
 
                foreach( $menu as $title => $qs ) {
                        if ( $input != $qs ) {
-                               $output .= "<p><a 
href=\"{$this->getTitle()->getFullURL()}/{$qs}\">{$title}</a><p>";
+                               $output .= "<p><a 
href=\"{$this->getPageTitle()->getFullURL()}/{$qs}\">{$title}</a><p>";
                        } else {
                                $output .= "<p><b>{$title}</b></p>";
                        }
diff --git a/ViewQuizzes.php b/ViewQuizzes.php
index 8b7837c..c9c2b97 100644
--- a/ViewQuizzes.php
+++ b/ViewQuizzes.php
@@ -19,7 +19,7 @@
 
                $out = $this->getOutput();
                $request = $this->getRequest();
-               $title = $this->getTitle();
+               $title = $this->getPageTitle();
 
                // Add CSS & JS
                $out->addModules( 'ext.quizGame' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If312f606e62d4721218a1239b3ecd4ead2513f02
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/QuizGame
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