(bug 11095) Honour "preview on first edit" preference when preloading text for a...
authorRob Church <robchurch@users.mediawiki.org>
Tue, 28 Aug 2007 15:31:16 +0000 (15:31 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Tue, 28 Aug 2007 15:31:16 +0000 (15:31 +0000)
RELEASE-NOTES
includes/EditPage.php

index f3bfd9e..a76eaa7 100644 (file)
@@ -190,6 +190,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Add accesskey 's' and tooltip to 'upload file' button at Special:Upload
 * Introduced 'SkinAfterBottomScripts' hook; see docs/hooks.txt for
   more information
+* (bug 11095) Honour "preview on first edit" preference when preloading
+  text for a non-existent page
 
 == Bugfixes since 1.10 ==
 
index 4cd776f..3f0d699 100644 (file)
@@ -449,7 +449,7 @@ class EditPage {
                } elseif( $this->section == 'new' ) {
                        // Nothing *to* preview for new sections
                        return false;
-               } elseif( $this->mTitle->exists() && $wgUser->getOption( 'previewonfirst' ) ) {
+               } elseif( ( $wgRequest->getVal( 'preload' ) !== '' || $this->mTitle->exists() ) && $wgUser->getOption( 'previewonfirst' ) ) {
                        // Standard preference behaviour
                        return true;
                } elseif( !$this->mTitle->exists() && $this->mTitle->getNamespace() == NS_CATEGORY ) {