Umherirrender has uploaded a new change for review.

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

Change subject: Replace deprecated Title::escapeFullURL calls
......................................................................

Replace deprecated Title::escapeFullURL calls

Change-Id: Ib2fca529e77591f05579ffd39fd532b33594a63a
---
M PictureGameHome.body.php
1 file changed, 43 insertions(+), 43 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PictureGame 
refs/changes/75/142775/1

diff --git a/PictureGameHome.body.php b/PictureGameHome.body.php
index 35aadee..e3e2c1c 100644
--- a/PictureGameHome.body.php
+++ b/PictureGameHome.body.php
@@ -356,18 +356,18 @@
 
                $output .= '<div id="edit-container" class="edit-container">
                        <form id="picGameVote" name="picGameVote" method="post" 
action="' .
-                       $this->getPageTitle()->escapeFullURL( 
'picGameAction=completeEdit' ) . '">
+                       htmlspecialchars( $this->getPageTitle()->getFullURL( 
'picGameAction=completeEdit' ) ) . '">
                        <div id="edit-textboxes" class="edit-textboxes">
 
                                <div class="credit-box-edit" id="creditBox">
                                        <h1>' . $this->msg( 
'picturegame-submittedby' )->plain() . '</h1>
                                        <div class="submitted-by-image">
-                                               <a href="' . 
$usrTitleObj->escapeFullURL() . "\">
+                                               <a href="' . htmlspecialchars( 
$usrTitleObj->getFullURL() ) . "\">
                                                        <img 
src=\"{$wgUploadPath}/avatars/{$avatarID}\" style=\"border:1px solid #d7dee8; 
width:50px; height:50px;\" alt=\"\" border=\"0\"/>
                                                </a>
                                        </div>
                                        <div class=\"submitted-by-user\">
-                                               <a href=\"" . 
$usrTitleObj->escapeFullURL() . "\">{$user_name}</a>
+                                               <a href=\"" . htmlspecialchars( 
$usrTitleObj->getFullURL() ) . "\">{$user_name}</a>
                                                <ul>
                                                        <li>
                                                                <img 
src=\"{$imgPath}/voteIcon.gif\" border=\"0\" alt=\"\" />
@@ -434,7 +434,7 @@
                        <div id="complete-buttons" class="complete-buttons">
                                <input type="button" 
onclick="document.picGameVote.submit()" value="' . $this->msg( 
'picturegame-buttonsubmit' )->plain() . "\"/>
                                <input type=\"button\" 
onclick=\"window.location='" .
-                                       $this->getPageTitle()->escapeFullURL( 
"picGameAction=renderPermalink&id={$imgID}" ) . "'\" value=\"" .
+                                       htmlspecialchars( 
$this->getPageTitle()->getFullURL( "picGameAction=renderPermalink&id={$imgID}" 
) ) . "'\" value=\"" .
                                        $this->msg( 'picturegame-buttoncancel' 
)->plain() . "\"/>
                        </div>
                </form>
@@ -465,7 +465,7 @@
                $out->setPageTitle( $this->msg( 'picturegame-adminpaneltitle' 
)->text() );
                $output .= '
                <div class="back-link">
-                       <a href="' . $this->getPageTitle()->escapeFullURL( 
'picGameAction=startGame' ) . '"> ' .
+                       <a href="' . htmlspecialchars( 
$this->getPageTitle()->getFullURL( 'picGameAction=startGame' ) ) . '"> ' .
                                $this->msg( 'picturegame-adminpanelbacktogame' 
)->text() . '</a>
                </div>
 
@@ -733,88 +733,88 @@
                if( $type == 'votes' && $direction == 'most' ) {
                        $output .= '<h1>' . $this->msg( 'picturegame-most' 
)->text() . '</h1>
                                        <p><b>' . $this->msg( 
'picturegame-mostvotes' )->text() . '</b></p>
-                                       <p><a href="' . 
$thisTitle->escapeFullURL( array(
+                                       <p><a href="' . htmlspecialchars( 
$thisTitle->getFullURL( array(
                                                'picGameAction' => 'gallery',
                                                'type' => 'heat',
                                                'direction' => 'most'
-                                       ) ) . '">' . $this->msg( 
'picturegame-mostheat' )->text() . '</a></p>
+                                       ) ) ) . '">' . $this->msg( 
'picturegame-mostheat' )->text() . '</a></p>
 
                                        <h1 style="margin:10px 0px 
!important;">' . $this->msg( 'picturegame-least' )->text() . '</h1>
-                                       <p><a href="' . 
$thisTitle->escapeFullURL( array(
+                                       <p><a href="' . htmlspecialchars( 
$thisTitle->getFullURL( array(
                                                'picGameAction' => 'gallery',
                                                'type' => 'votes',
                                                'direction' => 'least'
-                                       ) ) . '">' . $this->msg( 
'picturegame-leastvotes' )->text() . '</a></p>
-                                       <p><a href="' . 
$thisTitle->escapeFullURL( array(
+                                       ) ) ) . '">' . $this->msg( 
'picturegame-leastvotes' )->text() . '</a></p>
+                                       <p><a href="' . htmlspecialchars( 
$thisTitle->getFullURL( array(
                                                'picGameAction' => 'gallery',
                                                'type' => 'heat',
                                                'direction' => 'least'
-                                       ) ) . '">' . $this->msg( 
'picturegame-leastheat' )->text() . '</a></p>';
+                                       ) ) ) . '">' . $this->msg( 
'picturegame-leastheat' )->text() . '</a></p>';
                }
 
                if( $type == 'votes' && $direction == 'least' ) {
                        $output .= '<h1>' . $this->msg( 'picturegame-most' 
)->text() . '</h1>
-                                       <p><a href="' . 
$thisTitle->escapeFullURL( array(
+                                       <p><a href="' . htmlspecialchars( 
$thisTitle->getFullURL( array(
                                                'picGameAction' => 'gallery',
                                                'type' => 'votes',
                                                'direction' => 'most'
-                                       ) ) . '">' . $this->msg( 
'picturegame-mostvotes' )->text() . '</a></p>
-                                       <p><a href="' . 
$thisTitle->escapeFullURL( array(
+                                       ) ) ) . '">' . $this->msg( 
'picturegame-mostvotes' )->text() . '</a></p>
+                                       <p><a href="' . htmlspecialchars( 
$thisTitle->getFullURL( array(
                                                'picGameAction' => 'gallery',
                                                'type' => 'heat',
                                                'direction' => 'most'
-                                       ) ) . '">' . $this->msg( 
'picturegame-mostheat' )->text() . '</a></p>
+                                       ) ) ) . '">' . $this->msg( 
'picturegame-mostheat' )->text() . '</a></p>
 
                                        <h1 style="margin:10px 0px 
!important;">' . $this->msg( 'picturegame-least' )->text() . '</h1>
                                        <p><b>' . $this->msg( 
'picturegame-leastvotes' )->text() . '</b></p>
-                                       <p><a href="' . 
$thisTitle->escapeFullURL( array(
+                                       <p><a href="' . htmlspecialchars( 
$thisTitle->getFullURL( array(
                                                'picGameAction' => 'gallery',
                                                'type' => 'heat',
                                                'direction' => 'least'
-                                       ) ) . '">' . $this->msg( 
'picturegame-leastheat' )->text() . '</a></p>';
+                                       ) ) ) . '">' . $this->msg( 
'picturegame-leastheat' )->text() . '</a></p>';
                }
 
                if( $type == 'heat' && $direction == 'most' ) {
                        $output .= '<h1>' . $this->msg( 'picturegame-most' 
)->text() . '</h1>
-                                       <p><a href="' . 
$thisTitle->escapeFullURL( array(
+                                       <p><a href="' . htmlspecialchars( 
$thisTitle->getFullURL( array(
                                                'picGameAction' => 'gallery',
                                                'type' => 'votes',
                                                'direction' => 'most'
-                                       ) ) . '">' . $this->msg( 
'picturegame-mostvotes' )->text() . '</a></p>
+                                       ) ) ) . '">' . $this->msg( 
'picturegame-mostvotes' )->text() . '</a></p>
                                        <p><b>' . $this->msg( 
'picturegame-mostheat' )->text() . '</b></p>
 
                                        <h1 style="margin:10px 0px 
!important;">' . $this->msg( 'picturegame-least' )->text() . '</h1>
-                                       <p><a href="' . 
$thisTitle->escapeFullURL( array(
+                                       <p><a href="' . htmlspecialchars( 
$thisTitle->getFullURL( array(
                                                'picGameAction' => 'gallery',
                                                'type' => 'votes',
                                                'direction' => 'least'
-                                       ) ) . '">' . $this->msg( 
'picturegame-leastvotes' )->text() . '</a></p>
-                                       <p><a href="' . 
$thisTitle->escapeFullURL( array(
+                                       ) ) ) . '">' . $this->msg( 
'picturegame-leastvotes' )->text() . '</a></p>
+                                       <p><a href="' . htmlspecialchars( 
$thisTitle->getFullURL( array(
                                                'picGameAction' => 'gallery',
                                                'type' => 'heat',
                                                'direction' => 'least'
-                                       ) ) . '">' . $this->msg( 
'picturegame-leastheat' )->text() . '</a></p>';
+                                       ) ) ) . '">' . $this->msg( 
'picturegame-leastheat' )->text() . '</a></p>';
                }
 
                if( $type == 'heat' && $direction == 'least' ) {
                        $output .= '<h1>' . $this->msg( 'picturegame-most' 
)->text() . '</h1>
-                                       <p><a href="' . 
$thisTitle->escapeFullURL( array(
+                                       <p><a href="' . htmlspecialchars( 
$thisTitle->getFullURL( array(
                                                'picGameAction' => 'gallery',
                                                'type' => 'votes',
                                                'direction' => 'most'
-                                       ) ) . '">' . $this->msg( 
'picturegame-mostvotes' )->text() . '</a></p>
-                                       <p><a href="' . 
$thisTitle->escapeFullURL( array(
+                                       ) ) ) . '">' . $this->msg( 
'picturegame-mostvotes' )->text() . '</a></p>
+                                       <p><a href="' . htmlspecialchars( 
$thisTitle->getFullURL( array(
                                                'picGameAction' => 'gallery',
                                                'type' => 'heat',
                                                'direction' => 'most'
-                                       ) ) . '">' . $this->msg( 
'picturegame-mostheat' )->text() . '</a></p>
+                                       ) ) ) . '">' . $this->msg( 
'picturegame-mostheat' )->text() . '</a></p>
 
                                        <h1 style="margin:10px 0px 
!important;">' . $this->msg( 'picturegame-least' )->text() . '</h1>
-                                       <p><a href="' . 
$thisTitle->escapeFullURL( array(
+                                       <p><a href="' . htmlspecialchars( 
$thisTitle->getFullURL( array(
                                                'picGameAction' => 'gallery',
                                                'type' => 'votes',
                                                'direction' => 'least'
-                                       ) ) . '">' . $this->msg( 
'picturegame-leastvotes' )->text() . '</a></p>
+                                       ) ) ) . '">' . $this->msg( 
'picturegame-leastvotes' )->text() . '</a></p>
                                        <p><b>' . $this->msg( 
'picturegame-leastheat' )->text() . '</b></p>';
                }
 
@@ -1379,8 +1379,8 @@
                $editlinks = '';
                if( $user->isAllowed( 'picturegameadmin' ) ) {
                        // If the user can edit, throw in some links
-                       $editlinks = ' - <a href="' . 
$this->getPageTitle()->escapeFullURL(
-                               'picGameAction=adminPanel' ) . '"> ' .
+                       $editlinks = ' - <a href="' . htmlspecialchars( 
$this->getPageTitle()->getFullURL(
+                               'picGameAction=adminPanel' ) ) . '"> ' .
                                $this->msg( 'picturegame-adminpanel' )->text() .
                        '</a> - <a class="picgame-protect-link" 
href="javascript:void(0);"> '
                                . $this->msg( 'picturegame-protectimages' 
)->text() . '</a>';
@@ -1391,7 +1391,7 @@
                if( $user->isLoggedIn() ) {
                        $createLink = '
                        <div class="create-link">
-                               <a href="' . 
$this->getPageTitle()->escapeFullURL( 'picGameAction=startCreate' ) . '">
+                               <a href="' . htmlspecialchars( 
$this->getPageTitle()->getFullURL( 'picGameAction=startCreate' ) ) . '">
                                        <img src="' . $wgExtensionAssetsPath . 
'/PictureGame/images/addIcon.gif" border="0" alt="" />'
                                        . $this->msg( 'picturegame-createlink' 
)->text() .
                                '</a>
@@ -1448,13 +1448,13 @@
                                                <ul>
                                                        <li id=\"backButton\" 
style=\"display:" . ( $lastID > 0 ? 'block' : 'none' ) . "\">
                                                                <a 
href=\"javascript:window.parent.document.location='" .
-                                                                       
$this->getPageTitle()->escapeFullURL( 'picGameAction=renderPermalink' ) .
+                                                                       
htmlspecialchars( $this->getPageTitle()->getFullURL( 
'picGameAction=renderPermalink' ) ) .
                                                                        "&id=' 
+ document.getElementById('lastid').value\">"
                                                                        . 
$this->msg( 'picturegame-backbutton' )->text() .
                                                                "</a>
                                                        </li>
                                                        <li id=\"skipButton\" 
style=\"display:" . ( $next_id > 0 ? 'block' : 'none' ) . "\">
-                                                               <a href=\"" . 
$this->getPageTitle()->escapeFullURL( 'picGameAction=startGame' ) . '">'
+                                                               <a href=\"" . 
htmlspecialchars( $this->getPageTitle()->getFullURL( 'picGameAction=startGame' 
) ) . '">'
                                                                        . 
$this->msg( 'picturegame-skipbutton' )->text() .
                                                                '</a>
                                                        </li>
@@ -1462,7 +1462,7 @@
                                        </div>
 
                                        <form id="picGameVote" 
name="picGameVote" method="post" action="' .
-                                               
$this->getPageTitle()->escapeFullURL( 'picGameAction=castVote' ) . "\">
+                                               htmlspecialchars( 
$this->getPageTitle()->getFullURL( 'picGameAction=castVote' ) ) . "\">
                                                <input id=\"key\" name=\"key\" 
type=\"hidden\" value=\"" . md5( $imgID . $this->SALT ) . "\" />
                                                <input id=\"id\" name=\"id\" 
type=\"hidden\" value=\"" . $imgID . "\" />
                                                <input id=\"lastid\" 
name=\"lastid\" type=\"hidden\" value=\"" . $lastID . "\" />
@@ -1523,7 +1523,7 @@
                                        <a class=\"picgame-flag-link\" 
href=\"javascript:void(0);\">"
                                                . $this->msg( 
'picturegame-reportimages' )->text() .
                                        " </a> -
-                                       <a 
href=\"javascript:window.parent.document.location='" . 
$this->getPageTitle()->escapeFullURL( 'picGameAction=renderPermalink' ) . 
"&id=' + document.getElementById('id').value\">"
+                                       <a 
href=\"javascript:window.parent.document.location='" . htmlspecialchars( 
$this->getPageTitle()->getFullURL( 'picGameAction=renderPermalink' ) ) . "&id=' 
+ document.getElementById('id').value\">"
                                                . $this->msg( 
'picturegame-permalink' )->text() .
                                        '</a>'
                                . $editlinks . "
@@ -1654,7 +1654,7 @@
                                                <p><input type="button" 
class="site-button" value="' .
                                                        $this->msg( 
'picturegame-buttonplaygame' )->text() .
                                                        '" 
onclick="window.location=\'' .
-                                                       
$this->getPageTitle()->escapeFullURL( 'picGameAction=startGame' ) . '\'" />
+                                                       htmlspecialchars( 
$this->getPageTitle()->getFullURL( 'picGameAction=startGame' ) ) . '\'" />
                                                </p>
                                        </div>';
                                $out->addHTML( $output );
@@ -1688,10 +1688,10 @@
                        $output = $this->msg( 
'picturegame-creategamenotloggedin' )->text();
                        $output .= "<p>
                                <input type=\"button\" class=\"site-button\" 
onclick=\"window.location='" .
-                                       SpecialPage::getTitleFor( 'Userlogin', 
'signup' )->escapeFullURL() .
+                                       htmlspecialchars( 
SpecialPage::getTitleFor( 'Userlogin', 'signup' )->getFullURL() ) .
                                        "'\" value=\"" . $this->msg( 
'picturegame-signup' )->text() . "\" />
                                <input type=\"button\" class=\"site-button\" 
onclick=\"window.location='" .
-                                       SpecialPage::getTitleFor( 'Userlogin' 
)->escapeFullURL() .
+                                       htmlspecialchars( 
SpecialPage::getTitleFor( 'Userlogin' )->getFullURL() ) .
                                        "'\" value=\"" . $this->msg( 
'picturegame-login' )->text() . "\" />
                        </p>";
                        $out->addHTML( $output );
@@ -1727,7 +1727,7 @@
 
                // Show a link to the admin panel for picture game admins
                if( $user->isAllowed( 'picturegameadmin' ) ) {
-                       $adminlink = '<a href="' . 
$this->getPageTitle()->escapeFullURL( 'picGameAction=adminPanel' ) . '"> ' .
+                       $adminlink = '<a href="' . htmlspecialchars( 
$this->getPageTitle()->getFullURL( 'picGameAction=adminPanel' ) ) . '"> ' .
                                $this->msg( 'picturegame-adminpanel' )->text() 
. ' </a>';
                }
 
@@ -1795,7 +1795,7 @@
                        <div class="uploadLeft">
                                <div id="uploadTitle" class="uploadTitle">
                                        <form id="picGamePlay" 
name="picGamePlay" method="post" action="' .
-                                               
$this->getPageTitle()->escapeFullURL( 'picGameAction=createGame' ) . '">
+                                               htmlspecialchars( 
$this->getPageTitle()->getFullURL( 'picGameAction=createGame' ) ) . '">
                                                <h1>' . $this->msg( 
'picturegame-creategamegametitle' )->text() . '</h1>
                                                <div class="picgame-errors" 
id="picgame-errors"></div>
                                                <p>
@@ -1823,7 +1823,7 @@
                                                        </div>
                                                        <div id="imageOne" 
class="imageOne" style="display:none;"></div>
                                                        <iframe 
class="imageOneUpload-frame" scrolling="no" frameborder="0" width="400" 
id="imageOneUpload-frame" src="' .
-                                                               
$uploadObj->escapeFullURL( 'callbackPrefix=imageOne_' ) . '"></iframe>
+                                                               
htmlspecialchars( $uploadObj->getFullURL( 'callbackPrefix=imageOne_' ) ) . 
'"></iframe>
                                                </div>
 
                                                <div id="imageTwoUpload" 
class="imageTwoUpload">
@@ -1835,7 +1835,7 @@
                                                        </div>
                                                        <div id="imageTwo" 
class="imageTwo" style="display:none;"></div>
                                                        <iframe 
id="imageTwoUpload-frame" scrolling="no" frameborder="0" width="510" src="' .
-                                                               
$uploadObj->escapeFullURL( 'callbackPrefix=imageTwo_' ) . '"></iframe>
+                                                               
htmlspecialchars( $uploadObj->getFullURL( 'callbackPrefix=imageTwo_' ) ) . 
'"></iframe>
                                                </div>
 
                                                <div class="cleared"></div>

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2fca529e77591f05579ffd39fd532b33594a63a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PictureGame
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>

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

Reply via email to