* (bug 1250) Let users use "show preview" and "show changes" even if the wiki is...
authorAlex Z <mrzman@users.mediawiki.org>
Mon, 13 Oct 2008 22:39:53 +0000 (22:39 +0000)
committerAlex Z <mrzman@users.mediawiki.org>
Mon, 13 Oct 2008 22:39:53 +0000 (22:39 +0000)
RELEASE-NOTES
includes/EditPage.php

index f7c8989..b5cf6a1 100644 (file)
@@ -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 ===
 
index 4196a67..7d3d7e6 100644 (file)
@@ -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' );