}
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();
* @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 ),
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'.
);
}
}
# 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
$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>'
) );
}
}
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 );
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;
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'] );
// 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 ) );
+ return $rt->getFullURL( array( 'rdfrom' => $source ) );
} else {
// External pages pages without "local" bit set are not valid
// redirect targets
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();
$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() ) .
$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() ) .