From f2517b1f46a3b28a9b7b5a703fcd17f37a460a2d Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sat, 24 Dec 2005 08:18:56 +0000 Subject: [PATCH] * (bug 4368) Don't show useless empty preview on new section creation --- RELEASE-NOTES | 1 + includes/EditPage.php | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index bbe169d911..2fdb7d64c2 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/EditPage.php b/includes/EditPage.php index b8af6d0564..5b20c98541 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -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() ) ); } /** -- 2.20.1