Replacing the fix for bug 12716.
authorRotem Liss <rotem@users.mediawiki.org>
Thu, 3 Jul 2008 12:25:52 +0000 (12:25 +0000)
committerRotem Liss <rotem@users.mediawiki.org>
Thu, 3 Jul 2008 12:25:52 +0000 (12:25 +0000)
includes/Title.php

index 3698791..ed6810c 100644 (file)
@@ -1358,11 +1358,6 @@ class Title {
                        $dbw->delete( 'protected_titles', array( 'pt_namespace' => $namespace,
                                'pt_title' => $title ), __METHOD__ );
                }
-               if($dbw->affectedRows() == 0) {
-                       //No Change
-                       return true;
-               }
-
                # Update the protection log
                $log = new LogPage( 'protect' );
 
@@ -1818,6 +1813,8 @@ class Title {
                                        } else { // Get rid of the old restrictions
                                                Title::purgeExpiredRestrictions();
                                        }
+                               } else {
+                                       $this->mRestrictionsExpiry = Block::decodeExpiry('');
                                }
                                $this->mRestrictionsLoaded = true;
                        }