r31276 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r31275‎ | r31276 | r31277 >
Date:21:31, 25 February 2008
Author:brion
Status:old
Tags:
Comment:
Revert r31243, r31244 -- regression: spews bogus protection entries into page history when no change is made.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -1771,6 +1771,7 @@
17721772 if ( $cascade )
17731773 $comment .= "$cascade_description";
17741774
 1775+ $rowsAffected = false;
17751776 # Update restrictions table
17761777 foreach( $limit as $action => $restrictions ) {
17771778 if ($restrictions != '' ) {
@@ -1778,11 +1779,18 @@
17791780 array( 'pr_page' => $id, 'pr_type' => $action
17801781 , 'pr_level' => $restrictions, 'pr_cascade' => $cascade ? 1 : 0
17811782 , 'pr_expiry' => $encodedExpiry ), __METHOD__ );
 1783+ if($dbw->affectedRows() != 0)
 1784+ $rowsAffected = true;
17821785 } else {
17831786 $dbw->delete( 'page_restrictions', array( 'pr_page' => $id,
17841787 'pr_type' => $action ), __METHOD__ );
 1788+ if($dbw->affectedRows() != 0)
 1789+ $rowsAffected = true;
17851790 }
17861791 }
 1792+ if(!$rowsAffected)
 1793+ // No change
 1794+ return true;
17871795
17881796 # Insert a null revision
17891797 $nullRevision = Revision::newNullRevision( $dbw, $id, $comment, true );
Index: trunk/phase3/RELEASE-NOTES
@@ -39,7 +39,6 @@
4040 * (bug 10677) Add link to the file description page on the shared repository
4141 * (bug 13084) Increase size of source/destination filename fields in upload form
4242 * (bug 13115) rebuildrecentchanges should print the current value of $wgRCMaxAge
43 -* (bug 13132) Unable to unprotect pages protected with earlier versions of MediaWiki
4443 * (bug 13140) Show parent categories in category namespace
4544 * (bug 13149) Correctly format 'fileexists' message on Upload page.
4645 * Make filepageexists accurate.

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r31243(bug 13132) Unable to unprotect pages protected with earlier versions of Medi...rotem06:42, 25 February 2008
r31244This variable was removed.rotem06:45, 25 February 2008

Status & tagging log