From: Andrew Garrett Date: Wed, 27 May 2009 16:11:23 +0000 (+0000) Subject: Reimplement Special:MoveThread with the new HTMLForm interface, fixing several bugs... X-Git-Tag: 1.31.0-rc.0~41634 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/fiche.php?a=commitdiff_plain;h=9505767893a8aaa186c6cccf295af901680a67e2;p=lhc%2Fweb%2Fwiklou.git Reimplement Special:MoveThread with the new HTMLForm interface, fixing several bugs in the process: * Bug 18949 LiquidThreads allows threads to be moved to pages without LiquidThreads enabled. * You could move a thread to the page it was already on, which would leave strange placeholders that don't make sense. * Allowing wikitext in some new places where it makes sense. --- diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index c06bd9e6ed..04b36daae4 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -146,6 +146,10 @@ class HTMLForm { $this->mValidationErrorMessage = $msg; } + function setIntro( $msg ) { + $this->mIntro = $msg; + } + function displayForm( $submitResult ) { global $wgOut; @@ -153,6 +157,10 @@ class HTMLForm { $this->displayErrors( $submitResult ); } + if ( isset($this->mIntro) ) { + $wgOut->addHTML( $this->mIntro ); + } + $html = $this->getBody(); // Hidden fields