From 239cd8d658d568ee63d4406efdb21920f1bb32be Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sat, 11 Oct 2008 13:53:00 +0000 Subject: [PATCH] Fix freaky calling method for MovePageForm::showForm(), add docs --- includes/specials/SpecialMovepage.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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; } -- 2.20.1