Umherirrender has uploaded a new change for review.
https://gerrit.wikimedia.org/r/59855
Change subject: Pass array to Title::getLocalURL and friends instead of strings
......................................................................
Pass array to Title::getLocalURL and friends instead of strings
This avoids handling of urlencode on the caller side
Change-Id: I21b988890356d11835eedba12a90a347bf0905b2
---
M includes/Article.php
M includes/ChangesFeed.php
M includes/EditPage.php
M includes/FeedUtils.php
M includes/OutputPage.php
M includes/Preferences.php
M includes/ProtectionForm.php
M includes/ProxyTools.php
M includes/Skin.php
M includes/SkinLegacy.php
M includes/SkinTemplate.php
M includes/SpecialPageFactory.php
M includes/Title.php
M includes/UserMailer.php
M includes/WebRequest.php
M includes/Wiki.php
M includes/WikiPage.php
M includes/actions/HistoryAction.php
M includes/api/ApiFormatXml.php
M includes/api/ApiPageSet.php
M includes/api/ApiQueryInfo.php
M includes/filerepo/FileRepo.php
M includes/parser/Parser.php
M includes/specials/SpecialExport.php
M includes/specials/SpecialMovepage.php
M includes/specials/SpecialRevisiondelete.php
M includes/specials/SpecialUndelete.php
27 files changed, 63 insertions(+), 56 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/55/59855/1
diff --git a/includes/Article.php b/includes/Article.php
index d2f52bc..2b1ffd9 100644
--- a/includes/Article.php
+++ b/includes/Article.php
@@ -339,7 +339,7 @@
$oldid = $nextid;
$this->mRevision = null;
} else {
- $this->mRedirectUrl =
$this->getTitle()->getFullURL( 'redirect=no' );
+ $this->mRedirectUrl =
$this->getTitle()->getFullURL( array( 'redirect' => 'no' ) );
}
} elseif ( $request->getVal( 'direction' ) == 'prev' ) {
$previd = $this->getTitle()->getPreviousRevisionID(
$oldid );
@@ -1189,7 +1189,7 @@
} elseif ( $this->getContext()->getRequest()->getInt( 'unhide'
) != 1 ) {
# Give explanation and add a link to view the
revision...
$oldid = intval( $this->getOldID() );
- $link = $this->getTitle()->getFullURL(
"oldid={$oldid}&unhide=1" );
+ $link = $this->getTitle()->getFullURL( array( 'oldid'
=> $oldid, 'unhide' => '1' ) );
$msg = $this->mRevision->isDeleted(
Revision::DELETED_RESTRICTED ) ?
'rev-suppressed-text-unhide' :
'rev-deleted-text-unhide';
$outputPage->wrapWikiMsg( "<div class='mw-warning
plainlinks'>\n$1\n</div>\n",
@@ -1549,7 +1549,7 @@
$checkWatch = $user->getBoolOption( 'watchdeletion' ) ||
$user->isWatched( $this->getTitle() );
$form = Xml::openElement( 'form', array( 'method' => 'post',
- 'action' => $this->getTitle()->getLocalURL(
'action=delete' ), 'id' => 'deleteconfirm' ) ) .
+ 'action' => $this->getTitle()->getLocalURL( array(
'action' => 'delete' ) ), 'id' => 'deleteconfirm' ) ) .
Xml::openElement( 'fieldset', array( 'id' =>
'mw-delete-table' ) ) .
Xml::tags( 'legend', null, wfMessage( 'delete-legend'
)->escaped() ) .
Xml::openElement( 'table', array( 'id' =>
'mw-deleteconfirm-table' ) ) .
diff --git a/includes/ChangesFeed.php b/includes/ChangesFeed.php
index e900e34..f4e5b79 100644
--- a/includes/ChangesFeed.php
+++ b/includes/ChangesFeed.php
@@ -192,10 +192,10 @@
if( $obj->rc_deleted ) continue;
if ( $obj->rc_this_oldid ) {
- $url = $title->getFullURL(
- 'diff=' . $obj->rc_this_oldid .
- '&oldid=' . $obj->rc_last_oldid
- );
+ $url = $title->getFullURL( array(
+ 'diff' => $obj->rc_this_oldid,
+ 'oldid' => $obj->rc_last_oldid,
+ ) );
} else {
// log entry or something like that.
$url = $title->getFullURL();
diff --git a/includes/EditPage.php b/includes/EditPage.php
index ae35f3e..58e6360 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -1219,7 +1219,7 @@
return true;
case self::AS_SUCCESS_NEW_ARTICLE:
- $query = $resultDetails['redirect'] ?
'redirect=no' : '';
+ $query = $resultDetails['redirect'] ? array(
'redirect' => 'no' ) : array();
$anchor = isset (
$resultDetails['sectionanchor'] ) ? $resultDetails['sectionanchor'] : '';
$wgOut->redirect( $this->mTitle->getFullURL(
$query ) . $anchor );
return false;
diff --git a/includes/FeedUtils.php b/includes/FeedUtils.php
index 4842c38..3742939 100644
--- a/includes/FeedUtils.php
+++ b/includes/FeedUtils.php
@@ -220,9 +220,10 @@
* @return string
*/
protected static function getDiffLink( Title $title, $newid, $oldid =
null ) {
- $queryParameters = ($oldid == null)
- ? "diff={$newid}"
- : "diff={$newid}&oldid={$oldid}";
+ $queryParameters = array( 'diff' => $newid );
+ if ( $oldid !== null ) {
+ $queryParameters['oldid'] = $oldid;
+ }
$diffUrl = $title->getFullURL( $queryParameters );
$diffLink = Html::element( 'a', array( 'href' => $diffUrl ),
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index bf3c084..2a377d7 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -3199,13 +3199,13 @@
'rel' => 'alternate',
'type' => 'application/x-wiki',
'title' => $msg,
- 'href' =>
$this->getTitle()->getLocalURL( 'action=edit' )
+ 'href' =>
$this->getTitle()->getLocalURL( array( 'action' => 'edit' ) )
) );
// Alternate edit link
$tags['alternative-edit'] = Html::element(
'link', array(
'rel' => 'edit',
'title' => $msg,
- 'href' =>
$this->getTitle()->getLocalURL( 'action=edit' )
+ 'href' =>
$this->getTitle()->getLocalURL( array( 'action' => 'edit' ) )
) );
}
}
@@ -3324,7 +3324,7 @@
foreach ( $wgAdvertisedFeedTypes as $format ) {
$tags[] = $this->feedLink(
$format,
- $rctitle->getLocalURL(
"feed={$format}" ),
+ $rctitle->getLocalURL( array(
'feed' => $format ) ),
$this->msg(
"site-{$format}-feed", $wgSitename )->text() # For grep: 'site-rss-feed',
'site-atom-feed'.
);
}
diff --git a/includes/Preferences.php b/includes/Preferences.php
index 79c3dd3..1c9eebf 100644
--- a/includes/Preferences.php
+++ b/includes/Preferences.php
@@ -1092,7 +1092,7 @@
}
# Create preview link
- $mplink = htmlspecialchars( $mptitle->getLocalURL(
"useskin=$skinkey" ) );
+ $mplink = htmlspecialchars( $mptitle->getLocalURL(
array( 'useskin' => $skinkey ) ) );
$linkTools[] = "<a target='_blank'
href=\"$mplink\">$previewtext</a>";
# Create links to user CSS/JS pages
diff --git a/includes/ProtectionForm.php b/includes/ProtectionForm.php
index de5e9db..ba53b03 100644
--- a/includes/ProtectionForm.php
+++ b/includes/ProtectionForm.php
@@ -190,7 +190,7 @@
if( $wgRequest->wasPosted() ) {
if( $this->save() ) {
- $q = $this->mArticle->isRedirect() ?
'redirect=no' : '';
+ $q = $this->mArticle->isRedirect() ? array(
'redirect' => 'no' ) : array();
$wgOut->redirect( $this->mTitle->getFullURL( $q
) );
}
} else {
@@ -359,7 +359,7 @@
if( !$this->disabled ) {
$wgOut->addModules( 'mediawiki.legacy.protect' );
$out .= Xml::openElement( 'form', array( 'method' =>
'post',
- 'action' => $this->mTitle->getLocalURL(
'action=protect' ),
+ 'action' => $this->mTitle->getLocalURL( array(
'action' => 'protect' ) ),
'id' => 'mw-Protect-Form', 'onsubmit' =>
'ProtectionForm.enableUnchainedInputs(true)' ) );
}
diff --git a/includes/ProxyTools.php b/includes/ProxyTools.php
index b54a9a3..fc7bb4b 100644
--- a/includes/ProxyTools.php
+++ b/includes/ProxyTools.php
@@ -109,7 +109,7 @@
if ( !$skip ) {
$title = SpecialPage::getTitleFor( 'Blockme' );
$iphash = md5( $ip . $wgProxyKey );
- $url = wfExpandUrl( $title->getFullURL( 'ip=' . $iphash ),
PROTO_HTTP );
+ $url = wfExpandUrl( $title->getFullURL( array( 'ip' => $iphash
) ), PROTO_HTTP );
foreach ( $wgProxyPorts as $port ) {
$params = implode( ' ', array(
diff --git a/includes/Skin.php b/includes/Skin.php
index 117e6e2..abaa2a8 100644
--- a/includes/Skin.php
+++ b/includes/Skin.php
@@ -596,7 +596,7 @@
function printSource() {
$oldid = $this->getRevisionId();
if ( $oldid ) {
- $url = htmlspecialchars( wfExpandIRI(
$this->getTitle()->getCanonicalURL( 'oldid=' . $oldid ) ) );
+ $url = htmlspecialchars( wfExpandIRI(
$this->getTitle()->getCanonicalURL( array( 'oldid' => $oldid ) ) ) );
} else {
// oldid not available for non existing pages
$url = htmlspecialchars( wfExpandIRI(
$this->getTitle()->getCanonicalURL() ) );
diff --git a/includes/SkinLegacy.php b/includes/SkinLegacy.php
index ca49024..6172761 100644
--- a/includes/SkinLegacy.php
+++ b/includes/SkinLegacy.php
@@ -220,7 +220,7 @@
$s = $wgLang->pipeList( array(
$s,
- '<a href="' . htmlspecialchars(
$title->getLocalURL( 'variant=' . $code ) ) . '" lang="' . $code . '"
hreflang="' . $code . '">' . htmlspecialchars( $varname ) . '</a>'
+ '<a href="' . htmlspecialchars(
$title->getLocalURL( array( 'variant' => $code ) ) ) . '" lang="' . $code . '"
hreflang="' . $code . '">' . htmlspecialchars( $varname ) . '</a>'
) );
}
}
diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php
index 17ec88a..e485632 100644
--- a/includes/SkinTemplate.php
+++ b/includes/SkinTemplate.php
@@ -906,7 +906,7 @@
$content_navigation['views']['addsection'] = array(
'class' => ( $isEditing
&& $section == 'new' ) ? 'selected' : false,
'text' =>
wfMessageFallback( "$skname-action-addsection", 'addsection' )->setContext(
$this->getContext() )->text(),
- 'href' =>
$title->getLocalURL( 'action=edit§ion=new' )
+ 'href' =>
$title->getLocalURL( array( 'action' => 'edit', 'section' => 'new' ) )
);
}
// Checks if the page has some kind of viewable
content
@@ -928,7 +928,7 @@
$content_navigation['views']['history']
= array(
'class' => ( $onPage && $action
== 'history' ) ? 'selected' : false,
'text' => wfMessageFallback(
"$skname-view-history", 'history_short' )->setContext( $this->getContext()
)->text(),
- 'href' => $title->getLocalURL(
'action=history' ),
+ 'href' => $title->getLocalURL(
array( 'action' => 'history' ) ),
'rel' => 'archives',
);
@@ -936,7 +936,7 @@
$content_navigation['actions']['delete'] = array(
'class' => ( $onPage &&
$action == 'delete' ) ? 'selected' : false,
'text' =>
wfMessageFallback( "$skname-action-delete", 'delete' )->setContext(
$this->getContext() )->text(),
- 'href' =>
$title->getLocalURL( 'action=delete' )
+ 'href' =>
$title->getLocalURL( array( 'action' => 'delete' ) )
);
}
@@ -971,7 +971,7 @@
$content_navigation['actions'][$mode] =
array(
'class' => ( $onPage && $action
== $mode ) ? 'selected' : false,
'text' => wfMessageFallback(
"$skname-action-$mode", $mode )->setContext( $this->getContext() )->text(),
- 'href' => $title->getLocalURL(
"action=$mode" )
+ 'href' => $title->getLocalURL(
array( 'action' => $mode ) )
);
}
@@ -1187,7 +1187,7 @@
if ( $revid ) {
$nav_urls['permalink'] = array(
'text' => $this->msg( 'permalink'
)->text(),
- 'href' =>
$this->getTitle()->getLocalURL( "oldid=$revid" )
+ 'href' =>
$this->getTitle()->getLocalURL( array( 'oldid' => $revid ) )
);
}
@@ -1203,7 +1203,7 @@
$nav_urls['info'] = array(
'text' => $this->msg( 'pageinfo-toolboxlink'
)->text(),
- 'href' => $this->getTitle()->getLocalURL(
"action=info" )
+ 'href' => $this->getTitle()->getLocalURL(
array( 'action' => 'info' ) )
);
if ( $this->getTitle()->getArticleID() ) {
diff --git a/includes/SpecialPageFactory.php b/includes/SpecialPageFactory.php
index a53b901..860f987 100644
--- a/includes/SpecialPageFactory.php
+++ b/includes/SpecialPageFactory.php
@@ -463,7 +463,6 @@
if ( $name != $page->getLocalName() &&
!$context->getRequest()->wasPosted() ) {
$query =
$context->getRequest()->getQueryValues();
unset( $query['title'] );
- $query = wfArrayToCgi( $query );
$title = $page->getTitle( $par );
$url = $title->getFullURL( $query );
$context->getOutput()->redirect( $url );
diff --git a/includes/Title.php b/includes/Title.php
index d0ac97b..a47fa0d 100644
--- a/includes/Title.php
+++ b/includes/Title.php
@@ -1626,7 +1626,7 @@
if ( $this->mInterwiki != '' ) {
return '';
}
- $s = $this->getLocalURL( 'action=edit' );
+ $s = $this->getLocalURL( array( 'action' => 'edit' ) );
return $s;
}
@@ -3465,14 +3465,14 @@
public function getSquidURLs() {
$urls = array(
$this->getInternalURL(),
- $this->getInternalURL( 'action=history' )
+ $this->getInternalURL( array( 'action' => 'history' ) )
);
$pageLang = $this->getPageLanguage();
if ( $pageLang->hasVariants() ) {
$variants = $pageLang->getVariants();
foreach ( $variants as $vCode ) {
- $urls[] = $this->getInternalURL( '', $vCode );
+ $urls[] = $this->getInternalURL( array(),
$vCode );
}
}
diff --git a/includes/UserMailer.php b/includes/UserMailer.php
index 2eb8429..90a2ce1 100644
--- a/includes/UserMailer.php
+++ b/includes/UserMailer.php
@@ -703,14 +703,14 @@
if ( $this->oldid ) {
// Always show a link to the diff which triggered the
mail. See bug 32210.
$keys['$NEWPAGE'] = "\n\n" . wfMessage(
'enotif_lastdiff',
- $this->title->getCanonicalURL(
'diff=next&oldid=' . $this->oldid ) )
+ $this->title->getCanonicalURL( array( 'diff' =>
'next', 'oldid' => $this->oldid ) ) )
->inContentLanguage()->text();
if ( !$wgEnotifImpersonal ) {
// For personal mail, also show a link to the
diff of all changes
// since last visited.
$keys['$NEWPAGE'] .= "\n\n" . wfMessage(
'enotif_lastvisited',
- $this->title->getCanonicalURL(
'diff=0&oldid=' . $this->oldid ) )
+ $this->title->getCanonicalURL( array(
'diff' => '0', 'oldid' => $this->oldid ) ) )
->inContentLanguage()->text();
}
$keys['$OLDID'] = $this->oldid;
@@ -728,7 +728,7 @@
$keys['$PAGETITLE_URL'] = $this->title->getCanonicalURL();
$keys['$PAGEMINOREDIT'] = $this->minorEdit ?
wfMessage( 'minoredit' )->inContentLanguage()->text() :
'';
- $keys['$UNWATCHURL'] = $this->title->getCanonicalURL(
'action=unwatch' );
+ $keys['$UNWATCHURL'] = $this->title->getCanonicalURL( array(
'action' => 'unwatch' ) );
if ( $this->editor->isAnon() ) {
# real anon (user:xxx.xxx.xxx.xxx)
diff --git a/includes/WebRequest.php b/includes/WebRequest.php
index 3bdf645..99526ac 100644
--- a/includes/WebRequest.php
+++ b/includes/WebRequest.php
@@ -722,8 +722,9 @@
$newquery = $this->getQueryValues();
unset( $newquery['title'] );
$newquery = array_merge( $newquery, $array );
- $query = wfArrayToCgi( $newquery );
- return $onlyquery ? $query : $wgTitle->getLocalURL( $query );
+ return $onlyquery
+ ? wfArrayToCgi( $newquery )
+ : $wgTitle->getLocalURL( $newquery );
}
/**
diff --git a/includes/Wiki.php b/includes/Wiki.php
index f8f699c..e11ca91 100644
--- a/includes/Wiki.php
+++ b/includes/Wiki.php
@@ -227,7 +227,7 @@
if ( $title->getInterwiki() != '' ) {
$rdfrom = $request->getVal( 'rdfrom' );
if ( $rdfrom ) {
- $url = $title->getFullURL( 'rdfrom=' .
urlencode( $rdfrom ) );
+ $url = $title->getFullURL( array( 'rdfrom' =>
$rdfrom ) );
} else {
$query = $request->getValues();
unset( $query['title'] );
diff --git a/includes/WikiPage.php b/includes/WikiPage.php
index 3f7e497..62c3ef7 100644
--- a/includes/WikiPage.php
+++ b/includes/WikiPage.php
@@ -943,8 +943,8 @@
//
// This can be hard to reverse and may produce
loops,
// so they may be disabled in the site
configuration.
- $source = $this->mTitle->getFullURL(
'redirect=no' );
- return $rt->getFullURL( 'rdfrom=' . urlencode(
$source ) );
+ $source = $this->mTitle->getFullURL( array(
'redirect' => 'no' ) );
+ return $rt->getFullURL( array( 'rdfrom' =>
$source ) );
} else {
// External pages pages without "local" bit set
are not valid
// redirect targets
diff --git a/includes/actions/HistoryAction.php
b/includes/actions/HistoryAction.php
index 7296126..7a35db4 100644
--- a/includes/actions/HistoryAction.php
+++ b/includes/actions/HistoryAction.php
@@ -256,7 +256,7 @@
$this->getTitle()->getPrefixedText() . ' - ' .
$this->msg( 'history-feed-title'
)->inContentLanguage()->text(),
$this->msg( 'history-feed-description'
)->inContentLanguage()->text(),
- $this->getTitle()->getFullURL( 'action=history' )
+ $this->getTitle()->getFullURL( array( 'action' =>
'history' ) )
);
// Get a limit on number of feed entries. Provide a sane default
@@ -323,7 +323,7 @@
return new FeedItem(
$title,
$text,
- $this->getTitle()->getFullURL( 'diff=' . $rev->getId()
. '&oldid=prev' ),
+ $this->getTitle()->getFullURL( array( 'diff' =>
$rev->getId(), 'oldid' => 'prev' ) ),
$rev->getTimestamp(),
$rev->getUserText(),
$this->getTitle()->getTalkPage()->getFullURL()
diff --git a/includes/api/ApiFormatXml.php b/includes/api/ApiFormatXml.php
index f9b85ef..43650a5 100644
--- a/includes/api/ApiFormatXml.php
+++ b/includes/api/ApiFormatXml.php
@@ -210,7 +210,7 @@
$this->setWarning( 'Stylesheet should have .xsl
extension.' );
return;
}
- $this->printText( '<?xml-stylesheet href="' . htmlspecialchars(
$nt->getLocalURL( 'action=raw' ) ) . '" type="text/xsl" ?>' );
+ $this->printText( '<?xml-stylesheet href="' . htmlspecialchars(
$nt->getLocalURL( array( 'action' => 'raw' ) ) ) . '" type="text/xsl" ?>' );
}
public function getAllowedParams() {
diff --git a/includes/api/ApiPageSet.php b/includes/api/ApiPageSet.php
index 0645edb..a50f66b 100644
--- a/includes/api/ApiPageSet.php
+++ b/includes/api/ApiPageSet.php
@@ -477,7 +477,7 @@
);
if ( $iwUrl ) {
$title = Title::newFromText( $rawTitleStr );
- $item['url'] = $title->getFullURL( '', false,
PROTO_CURRENT );
+ $item['url'] = $title->getFullURL( array(),
false, PROTO_CURRENT );
}
$values[] = $item;
}
diff --git a/includes/api/ApiQueryInfo.php b/includes/api/ApiQueryInfo.php
index 37cd915..fe12296 100644
--- a/includes/api/ApiQueryInfo.php
+++ b/includes/api/ApiQueryInfo.php
@@ -417,7 +417,7 @@
if ( $this->fld_url ) {
$pageInfo['fullurl'] = wfExpandUrl(
$title->getFullURL(), PROTO_CURRENT );
- $pageInfo['editurl'] = wfExpandUrl( $title->getFullURL(
'action=edit' ), PROTO_CURRENT );
+ $pageInfo['editurl'] = wfExpandUrl( $title->getFullURL(
array( 'action' => 'edit' ) ), PROTO_CURRENT );
}
if ( $this->fld_readable && $title->userCan( 'read',
$this->getUser() ) ) {
$pageInfo['readable'] = '';
diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php
index 0e30017..e03d2e0 100644
--- a/includes/filerepo/FileRepo.php
+++ b/includes/filerepo/FileRepo.php
@@ -707,8 +707,12 @@
*/
public function getDescriptionStylesheetUrl() {
if ( isset( $this->scriptDirUrl ) ) {
- return $this->makeUrl( 'title=MediaWiki:Filepage.css&' .
- wfArrayToCgi( Skin::getDynamicStylesheetQuery()
) );
+ return $this->makeUrl( array_merge(
+ array(
+ 'title' => 'MediaWiki:Filepage.css',
+ ),
+ Skin::getDynamicStylesheetQuery()
+ ) );
}
return false;
}
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 3ada925..f91673b 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -3783,7 +3783,7 @@
return wfMessage( 'scarytranscludedisabled'
)->inContentLanguage()->text();
}
- $url = $title->getFullURL( "action=$action" );
+ $url = $title->getFullURL( array( 'action' => $action ) );
if ( strlen( $url ) > 255 ) {
return wfMessage( 'scarytranscludetoolong'
)->inContentLanguage()->text();
diff --git a/includes/specials/SpecialExport.php
b/includes/specials/SpecialExport.php
index ef86e8e..ced7dd0 100644
--- a/includes/specials/SpecialExport.php
+++ b/includes/specials/SpecialExport.php
@@ -187,7 +187,7 @@
$out->addWikiMsg( 'exporttext' );
$form = Xml::openElement( 'form', array( 'method' => 'post',
- 'action' => $this->getTitle()->getLocalURL(
'action=submit' ) ) );
+ 'action' => $this->getTitle()->getLocalURL( array(
'action' => 'submit' ) ) ) );
$form .= Xml::inputLabel( $this->msg( 'export-addcattext'
)->text(), 'catname', 'catname', 40 ) . ' ';
$form .= Xml::submitButton( $this->msg( 'export-addcat'
)->text(), array( 'name' => 'addcat' ) ) . '<br />';
diff --git a/includes/specials/SpecialMovepage.php
b/includes/specials/SpecialMovepage.php
index c35c44e..ef71f44 100644
--- a/includes/specials/SpecialMovepage.php
+++ b/includes/specials/SpecialMovepage.php
@@ -256,7 +256,7 @@
$handler = ContentHandler::getForTitle( $this->oldTitle );
$out->addHTML(
- Xml::openElement( 'form', array( 'method' => 'post',
'action' => $this->getTitle()->getLocalURL( 'action=submit' ), 'id' =>
'movepage' ) ) .
+ Xml::openElement( 'form', array( 'method' => 'post',
'action' => $this->getTitle()->getLocalURL( array( 'action' => 'submit' ) ),
'id' => 'movepage' ) ) .
Xml::openElement( 'fieldset' ) .
Xml::element( 'legend', null, $this->msg(
'move-page-legend' )->text() ) .
Xml::openElement( 'table', array( 'id' =>
'mw-movepage-table' ) ) .
diff --git a/includes/specials/SpecialRevisiondelete.php
b/includes/specials/SpecialRevisiondelete.php
index 3a7399a..8011f44 100644
--- a/includes/specials/SpecialRevisiondelete.php
+++ b/includes/specials/SpecialRevisiondelete.php
@@ -312,10 +312,11 @@
$this->getOutput()->addHTML(
Xml::openElement( 'form', array(
'method' => 'POST',
- 'action' =>
$this->getTitle()->getLocalURL(
- 'target=' . urlencode(
$this->targetObj->getPrefixedDBkey() ) .
- '&file=' . urlencode(
$archiveName ) .
- '&token=' . urlencode(
$user->getEditToken( $archiveName ) ) )
+ 'action' =>
$this->getTitle()->getLocalURL( array(
+ 'target' =>
$this->targetObj->getPrefixedDBkey(),
+ 'file' => $archiveName,
+ 'token' =>
$user->getEditToken( $archiveName ),
+ ) )
)
) .
Xml::submitButton( $this->msg(
'revdelete-show-file-submit' )->text() ) .
diff --git a/includes/specials/SpecialUndelete.php
b/includes/specials/SpecialUndelete.php
index 70a34e3..9050724 100644
--- a/includes/specials/SpecialUndelete.php
+++ b/includes/specials/SpecialUndelete.php
@@ -1115,10 +1115,11 @@
$out->addHTML(
Xml::openElement( 'form', array(
'method' => 'POST',
- 'action' =>
$this->getTitle()->getLocalURL(
- 'target=' . urlencode(
$this->mTarget ) .
- '&file=' . urlencode(
$key ) .
- '&token=' . urlencode(
$user->getEditToken( $key ) ) )
+ 'action' =>
$this->getTitle()->getLocalURL( array(
+ 'target' => $this->mTarget,
+ 'file' => $key,
+ 'token' => $user->getEditToken(
$key ),
+ ) ),
)
) .
Xml::submitButton( $this->msg(
'undelete-show-file-submit' )->text() ) .
--
To view, visit https://gerrit.wikimedia.org/r/59855
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I21b988890356d11835eedba12a90a347bf0905b2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits