* (bug 4368) Don't show useless empty preview on new section creation
authorBrion Vibber <brion@users.mediawiki.org>
Sat, 24 Dec 2005 08:18:56 +0000 (08:18 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sat, 24 Dec 2005 08:18:56 +0000 (08:18 +0000)
RELEASE-NOTES
includes/EditPage.php

index bbe169d..2fdb7d6 100644 (file)
@@ -347,6 +347,7 @@ fully support the editing toolbar, but was found to be too confusing.
 * Log views show message when no matches
 * Fix raw sitenotice display on database error
 * Fix autoconfirm check for old accounts
+* (bug 4368) Don't show useless empty preview on new section creation
 
 
 === Caveats ===
index b8af6d0..5b20c98 100644 (file)
@@ -303,9 +303,10 @@ class EditPage {
         */
        function previewOnOpen() {
                global $wgUser;
-               return $wgUser->getOption( 'previewonfirst' ) ||
-                       ( $this->mTitle->getNamespace() == NS_CATEGORY &&
-                               !$this->mTitle->exists() );
+               return $this->section != 'new' &&
+                       ( $wgUser->getOption( 'previewonfirst' ) ||
+                               ( $this->mTitle->getNamespace() == NS_CATEGORY &&
+                                       !$this->mTitle->exists() ) );
        }
 
        /**