Article validation code (article preview on validation page)
authorMagnus Manske <magnusmanske@users.mediawiki.org>
Sat, 31 Jul 2004 15:42:29 +0000 (15:42 +0000)
committerMagnus Manske <magnusmanske@users.mediawiki.org>
Sat, 31 Jul 2004 15:42:29 +0000 (15:42 +0000)
includes/SpecialValidate.php

index 94199b0..1e78b5b 100644 (file)
@@ -208,7 +208,16 @@ class Validation
                        $html .= "</td><td {$topstyle} align=right valign=center><input type=submit name=doit value='" . wfMsg("ok") . "'></td>" ;
                        $html .= "<td {$topstyle} colspan=2></td></tr></table></form>\n" ;
                        }
-               return $html ;
+               
+               global $wgArticle ;
+               $html .= "<h2>" . wfMsg ( 'preview' ) . "</h2>" ;
+               $wgOut->addHTML ( $html ) ;
+               $wgOut->addWikiText ( $wgArticle->getContent( true ) ) ;
+               return "" ;
+               
+#              $html .= $wgArticle->getContent( true ) ;
+#              $html .= $wgArticle->view () ;
+#              return $html ;
                }
                
        function getData ( $user = -1 , $title = "" , $type = -1 )