* (bug 11114) Fix regression in read-only mode error display during editing
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 29 Aug 2007 18:11:17 +0000 (18:11 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 29 Aug 2007 18:11:17 +0000 (18:11 +0000)
Regression caused by the new permissions error reporting system.
For read-only case, the read-only text didn't get passed back with the message from Title::getUserPermissionsErrors().
The text is either originally set in $wgReadOnly or gets loaded into it from $wgReadOnlyFile during wfReadOnly(), so pulling that it now gets passed back as expected.
Other functions using $wgOut->readOnlyPage() would have still got the original, still working, behavior.

RELEASE-NOTES
includes/EditPage.php
includes/Title.php

index 832aa75..b04ea6e 100644 (file)
@@ -426,6 +426,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   supressed, breaking paging - now strikes out "fixed" results
 * (bug 8393) <sup> and <sub> need to be preserved (without attributes) for
   entries in the table of contents
+* (bug 11114) Fix regression in read-only mode error display during editing
+
 
 == API changes since 1.10 ==
 
index 3f0d699..03ac587 100644 (file)
@@ -545,9 +545,10 @@ class EditPage {
                        $this->summary   = '';
                        $this->edittime  = '';
                        $this->starttime = wfTimestampNow();
+                       $this->edit      = false;
                        $this->preview   = false;
                        $this->save      = false;
-                       $this->diff      = false;
+                       $this->diff      = false;
                        $this->minoredit = false;
                        $this->watchthis = false;
                        $this->recreate  = false;
index f74192b..80f298c 100644 (file)
@@ -1037,7 +1037,8 @@ class Title {
                global $wgLang;
 
                if ( wfReadOnly() && $action != 'read' ) {
-                       $errors[] = array( 'readonlytext' );
+                       global $wgReadOnly;
+                       $errors[] = array( 'readonlytext', $wgReadOnly );
                }
 
                global $wgEmailConfirmToEdit, $wgUser;