From 25501ec20f3416f888f9134d1ad78553a992471c Mon Sep 17 00:00:00 2001 From: Alex Z Date: Mon, 13 Oct 2008 22:39:53 +0000 Subject: [PATCH] * (bug 1250) Let users use "show preview" and "show changes" even if the wiki is set to read-only mode. --- RELEASE-NOTES | 2 ++ includes/EditPage.php | 10 +--------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index f7c89890e3..b5cf6a145e 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -161,6 +161,8 @@ The following extensions are migrated into MediaWiki 1.14: marked by unhealthy obsession with edit counts). * Added a file cache to the parser to improve page rendering time on pages with several uses of the same image. +* (bug 1250) Users can still use "show preview" and "show changes" even if the + wiki is set to read-only mode. === Bug fixes in 1.14 === diff --git a/includes/EditPage.php b/includes/EditPage.php index 4196a67727..7d3d7e602f 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -375,18 +375,10 @@ class EditPage { return; } - if ( wfReadOnly() ) { - if ( $this->save ){ + if ( wfReadOnly() && $this->save ) { // Force preview $this->save = false; $this->preview = true; - } elseif ( $this->preview || $this->diff ) { - // A warning will be displayed instead - } else { - $this->readOnlyPage( $this->getContent() ); - wfProfileOut( __METHOD__ ); - return; - } } $wgOut->addScriptFile( 'edit.js' ); -- 2.20.1