From: Ævar Arnfjörð Bjarmason Date: Sat, 7 May 2005 04:51:33 +0000 (+0000) Subject: * Added support for paramaters like Special:Movepage/Page_to_move X-Git-Tag: 1.5.0alpha2~279 X-Git-Url: http://git.cyclocoop.org/data/%24oldEdit?a=commitdiff_plain;h=6ad9f6942286dce36c4e48320bfb9d0349a707f1;p=lhc%2Fweb%2Fwiklou.git * Added support for paramaters like Special:Movepage/Page_to_move --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 2dde35894d..1e28771c21 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -155,6 +155,8 @@ Various bugfixes, small features, and a few experimental things: * Supplying a reason for a block is no longer mandatory * Language conversion support for category pages * $wgStyleSheetDirectory is no longer an alias for $wgStyleDirectory; +* Special:Movepage can now take paramaters like Special:Movepage/Page_to_move + (used to just be able to take paramaters via a GET request like index.php?title=Special:Movepage&target=Page_to_move) * ...and more! diff --git a/includes/SpecialMovepage.php b/includes/SpecialMovepage.php index 2332a29d5b..65708eafd2 100644 --- a/includes/SpecialMovepage.php +++ b/includes/SpecialMovepage.php @@ -13,7 +13,7 @@ require_once( "LinksUpdate.php" ); /** * Constructor */ -function wfSpecialMovepage() { +function wfSpecialMovepage( $par = null ) { global $wgUser, $wgOut, $wgRequest, $action, $wgOnlySysopMayMove; # check rights. We don't want newbies to move pages to prevents possible attack @@ -27,7 +27,7 @@ function wfSpecialMovepage() { return; } - $f = new MovePageForm(); + $f = new MovePageForm( $par ); if ( 'success' == $action ) { $f->showSuccess(); @@ -48,9 +48,10 @@ class MovePageForm { var $oldTitle, $newTitle, $reason; # Text input var $moveTalk, $deleteAndMove; - function MovePageForm() { + function MovePageForm( $par ) { global $wgRequest; - $this->oldTitle = $wgRequest->getText( 'wpOldTitle', $wgRequest->getVal( 'target' ) ); + $target = isset($par) ? $par : $wgRequest->getVal( 'target' ); + $this->oldTitle = $wgRequest->getText( 'wpOldTitle', $target ); $this->newTitle = $wgRequest->getText( 'wpNewTitle' ); $this->reason = $wgRequest->getText( 'wpReason' ); $this->moveTalk = $wgRequest->getBool( 'wpMovetalk', true );