From e9eaad23e5e949a8423127439c11bf0930386720 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sat, 24 Dec 2005 08:23:32 +0000 Subject: [PATCH] * Don't show useless empty preview on new page creation --- RELEASE-NOTES | 1 + includes/EditPage.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 2fdb7d64c2..00109341c3 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -348,6 +348,7 @@ fully support the editing toolbar, but was found to be too confusing. * 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 +* Don't show useless empty preview on new page creation === Caveats === diff --git a/includes/EditPage.php b/includes/EditPage.php index 5b20c98541..570641ca3c 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -304,7 +304,7 @@ class EditPage { function previewOnOpen() { global $wgUser; return $this->section != 'new' && - ( $wgUser->getOption( 'previewonfirst' ) || + ( ( $wgUser->getOption( 'previewonfirst' ) && $this->mTitle->exists() ) || ( $this->mTitle->getNamespace() == NS_CATEGORY && !$this->mTitle->exists() ) ); } -- 2.20.1