From: Tim Starling Date: Sat, 11 Oct 2008 13:53:00 +0000 (+0000) Subject: Fix freaky calling method for MovePageForm::showForm(), add docs X-Git-Tag: 1.31.0-rc.0~44792 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=239cd8d658d568ee63d4406efdb21920f1bb32be;p=lhc%2Fweb%2Fwiklou.git Fix freaky calling method for MovePageForm::showForm(), add docs --- diff --git a/includes/specials/SpecialMovepage.php b/includes/specials/SpecialMovepage.php index e90c4a599a..5f279446df 100644 --- a/includes/specials/SpecialMovepage.php +++ b/includes/specials/SpecialMovepage.php @@ -80,6 +80,12 @@ class MovePageForm { $this->watch = $wgRequest->getCheck( 'wpWatch' ); } + /** + * Show the form + * @param mixed $err Error message. May either be a string message name or + * array message name and parameters, like the second argument to + * OutputPage::wrapWikiMsg(). + */ function showForm( $err ) { global $wgOut, $wgUser, $wgFixDoubleRedirects; @@ -317,7 +323,8 @@ class MovePageForm { $error = $ot->moveTo( $nt, true, $this->reason, $createRedirect ); if ( $error !== true ) { - call_user_func_array( array($this, 'showForm'), $error ); + # FIXME: show all the errors in a list, not just the first one + $this->showForm( reset( $error ) ); return; }