Reimplement Special:MoveThread with the new HTMLForm interface, fixing several bugs...
authorAndrew Garrett <werdna@users.mediawiki.org>
Wed, 27 May 2009 16:11:23 +0000 (16:11 +0000)
committerAndrew Garrett <werdna@users.mediawiki.org>
Wed, 27 May 2009 16:11:23 +0000 (16:11 +0000)
* 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.

includes/HTMLForm.php

index c06bd9e..04b36da 100644 (file)
@@ -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