diff options
author | Brion Vibber <brion@users.mediawiki.org> | 2004-03-07 07:26:56 +0000 |
---|---|---|
committer | Brion Vibber <brion@users.mediawiki.org> | 2004-03-07 07:26:56 +0000 |
commit | b59ce2294385403bf4da644a0323aa7ba01b8a66 (patch) | |
tree | 9f61bee0131e39986465a6cd8ad11101fcc0ae2e /includes/SpecialMovepage.php | |
parent | 3e97b1dd6f486878d2216e6ff72a8b554e6098d7 (diff) | |
download | mediawikicore-b59ce2294385403bf4da644a0323aa7ba01b8a66.tar.gz mediawikicore-b59ce2294385403bf4da644a0323aa7ba01b8a66.zip |
Replace the random boolean parameters on Title::getURL() with a set of
practical, clear methods:
Title::getLocalURL() - "/wiki/index.php/Foobar" or "/wiki/index.php?title=Foobar&action=edit"
Title::getFullUrl() - ditto with $wgServer on the front
Title::getInternalUrl() - ditto with $wgInternalServer on the front (for some squid-related functions)
Title::escapeLocalUrl() - local URL escaped for HTML output
Title::escapeFullUrl() - full URL escaped for HTML output
All take an optional query parameter.
Title::getURL(), wfFullUrl() and wfFullUrlE() are now officially
deprecated and will result in instant death. wfLocalUrl() and wfLocalUrlE()
will be killed shortly; they are still used in the language files.
Notes
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/2649
Diffstat (limited to 'includes/SpecialMovepage.php')
-rw-r--r-- | includes/SpecialMovepage.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/includes/SpecialMovepage.php b/includes/SpecialMovepage.php index 5752604255f1..8fb906948d47 100644 --- a/includes/SpecialMovepage.php +++ b/includes/SpecialMovepage.php @@ -64,7 +64,7 @@ class MovePageForm { $movetalk = wfMsg( "movetalk" ); $titleObj = Title::makeTitle( NS_SPECIAL, "Movepage" ); - $action = $titleObj->getURL( "action=submit", true ); + $action = $titleObj->escapeLocalURL( "action=submit" ); if ( "" != $err ) { $wgOut->setSubtitle( wfMsg( "formerror" ) ); @@ -168,9 +168,9 @@ class MovePageForm { /* this needs to be done after LinksUpdate */ $urlArr = Array( # purge new title - $wgInternalServer.$this->nt->getURL(), + $wgInternalServer.$this->nt->getLocalURL(), # purge old title - $wgInternalServer.$this->ot->getURL()) + $wgInternalServer.$this->ot->getLocalURL()) ); wfPurgeSquidServers($urlArr); # purge pages linking to new title @@ -225,9 +225,9 @@ class MovePageForm { /* this needs to be done after LinksUpdate */ $urlArr = Array( # purge new title - $wgInternalServer.$nt->getURL()), + $nt->getInternalURL()), # purge old title - $wgInternalServer.$ot->getURL()) + $ot->getInternalURL()) ); wfPurgeSquidServers($urlArr); # purge pages linking to new title @@ -242,7 +242,7 @@ class MovePageForm { } } $titleObj = Title::makeTitle( NS_SPECIAL, "Movepage" ); - $success = $titleObj->getURL( + $success = $titleObj->getFullURL( "action=success&oldtitle=" . wfUrlencode( $this->ofx ) . "&newtitle=" . wfUrlencode( $this->nfx ) . "&talkmoved={$this->talkmoved}" ); |