From 37c99c10b4fcaf64bfe638c16cacf125a4c891c0 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 29 Aug 2007 18:11:17 +0000 Subject: [PATCH] * (bug 11114) Fix regression in read-only mode error display during editing 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 | 2 ++ includes/EditPage.php | 3 ++- includes/Title.php | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 832aa75e58..b04ea6eda2 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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) and 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 == diff --git a/includes/EditPage.php b/includes/EditPage.php index 3f0d6992e3..03ac587577 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -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; diff --git a/includes/Title.php b/includes/Title.php index f74192b164..80f298c873 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1037,7 +1037,8 @@ class Title { global $wgLang; if ( wfReadOnly() && $action != 'read' ) { - $errors[] = array( 'readonlytext' ); + global $wgReadOnly; + $errors[] = array( 'readonlytext', $wgReadOnly ); } global $wgEmailConfirmToEdit, $wgUser; -- 2.20.1