r25293 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25292‎ | r25293 | r25294 >
Date:18:11, 29 August 2007
Author:brion
Status:old
Tags:
Comment:
* (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.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/EditPage.php (modified) (history)
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/EditPage.php
@@ -545,9 +545,10 @@
546546 $this->summary = '';
547547 $this->edittime = '';
548548 $this->starttime = wfTimestampNow();
 549+ $this->edit = false;
549550 $this->preview = false;
550551 $this->save = false;
551 - $this->diff = false;
 552+ $this->diff = false;
552553 $this->minoredit = false;
553554 $this->watchthis = false;
554555 $this->recreate = false;
Index: trunk/phase3/includes/Title.php
@@ -1037,7 +1037,8 @@
10381038 global $wgLang;
10391039
10401040 if ( wfReadOnly() && $action != 'read' ) {
1041 - $errors[] = array( 'readonlytext' );
 1041+ global $wgReadOnly;
 1042+ $errors[] = array( 'readonlytext', $wgReadOnly );
10421043 }
10431044
10441045 global $wgEmailConfirmToEdit, $wgUser;
Index: trunk/phase3/RELEASE-NOTES
@@ -426,7 +426,9 @@
427427 supressed, breaking paging - now strikes out "fixed" results
428428 * (bug 8393) <sup> and <sub> need to be preserved (without attributes) for
429429 entries in the table of contents
 430+* (bug 11114) Fix regression in read-only mode error display during editing
430431
 432+
431433 == API changes since 1.10 ==
432434
433435 Full API documentation is available at http://www.mediawiki.org/wiki/API

Follow-up revisions

RevisionCommit summaryAuthorDate
r25303Merged revisions 25215-25302 via svnmerge from...david07:10, 30 August 2007

Status & tagging log