r31322 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r31321‎ | r31322 | r31323 >
Date:20:41, 26 February 2008
Author:rotem
Status:old
Tags:
Comment:
(bug 13132) Unable to unprotect pages protected with earlier versions of MediaWiki
* Replacing the fix for (bug 12716) Unprotecting a non-protected page leaves a log entry
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -1771,7 +1771,6 @@
17721772 if ( $cascade )
17731773 $comment .= "$cascade_description";
17741774
1775 - $rowsAffected = false;
17761775 # Update restrictions table
17771776 foreach( $limit as $action => $restrictions ) {
17781777 if ($restrictions != '' ) {
@@ -1779,18 +1778,11 @@
17801779 array( 'pr_page' => $id, 'pr_type' => $action
17811780 , 'pr_level' => $restrictions, 'pr_cascade' => $cascade ? 1 : 0
17821781 , 'pr_expiry' => $encodedExpiry ), __METHOD__ );
1783 - if($dbw->affectedRows() != 0)
1784 - $rowsAffected = true;
17851782 } else {
17861783 $dbw->delete( 'page_restrictions', array( 'pr_page' => $id,
17871784 'pr_type' => $action ), __METHOD__ );
1788 - if($dbw->affectedRows() != 0)
1789 - $rowsAffected = true;
17901785 }
17911786 }
1792 - if(!$rowsAffected)
1793 - // No change
1794 - return true;
17951787
17961788 # Insert a null revision
17971789 $nullRevision = Revision::newNullRevision( $dbw, $id, $comment, true );
Index: trunk/phase3/includes/Title.php
@@ -1658,6 +1658,8 @@
16591659
16601660 $this->mRestrictions['edit'] = array();
16611661 $this->mRestrictions['move'] = array();
 1662+ $this->mCascadeRestriction = false;
 1663+ $this->mRestrictionsExpiry = Block::decodeExpiry('');
16621664
16631665 # Backwards-compatibility: also load the restrictions from the page record (old format).
16641666
@@ -1679,8 +1681,6 @@
16801682 }
16811683
16821684 $this->mOldRestrictions = true;
1683 - $this->mCascadeRestriction = false;
1684 - $this->mRestrictionsExpiry = Block::decodeExpiry('');
16851685
16861686 }
16871687
Index: trunk/phase3/RELEASE-NOTES
@@ -45,6 +45,7 @@
4646 * Make the default filepageexists message accurate
4747 * (bug 12988) $wgMinimalPasswordLength no longer breaks create user by email
4848 * (bug 13022) Fix upload from URL on PHP 5.0.x
 49+* (bug 13132) Unable to unprotect pages protected with earlier versions of MediaWiki
4950
5051 === API changes in 1.13 ===
5152

Follow-up revisions

RevisionCommit summaryAuthorDate
r36967bug 12716 - trying to unprotect a title that isn't protected no longer genera...demon05:25, 3 July 2008
r36979Replacing the fix for bug 12716.rotem12:25, 3 July 2008
r44493(bug 12716) Unprotecting a non-protected page leaves a log entryaaron04:55, 12 December 2008

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r30020(bug 12716) Unprotecting a non-protected page leaves a log entrycatrope15:04, 21 January 2008
r31232Adding fixPageRestrcionts.php, a maintenance script which deals with bug 13132.huji20:11, 24 February 2008
r31243(bug 13132) Unable to unprotect pages protected with earlier versions of Medi...rotem06:42, 25 February 2008

Status & tagging log