only generate preview output when the request is actually a preview
authorTim Starling <tstarling@users.mediawiki.org>
Wed, 3 Jan 2007 15:09:53 +0000 (15:09 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Wed, 3 Jan 2007 15:09:53 +0000 (15:09 +0000)
includes/EditPage.php

index 722ff07..5c36690 100644 (file)
@@ -987,7 +987,9 @@ class EditPage {
 
                #need to parse the preview early so that we know which templates are used,
                #otherwise users with "show preview after edit box" will get a blank list
-               $previewOutput = $this->getPreviewText();
+               if ( $this->formtype == 'preview' ) {
+                       $previewOutput = $this->getPreviewText();
+               }
 
                $rows = $wgUser->getIntOption( 'rows' );
                $cols = $wgUser->getIntOption( 'cols' );