Merge "Clear legacy restriction field on page restriction update"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 26 Sep 2013 16:05:22 +0000 (16:05 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 26 Sep 2013 16:05:22 +0000 (16:05 +0000)
includes/WikiPage.php

index bfa9956..2265aca 100644 (file)
@@ -2347,6 +2347,14 @@ class WikiPage implements Page, IDBAccessObject {
                                }
                        }
 
+                       // Clear out legacy restriction fields
+                       $dbw->update(
+                               'page',
+                               array( 'page_restrictions' => '' ),
+                               array( 'page_id' => $id ),
+                               __METHOD__
+                       );
+
                        wfRunHooks( 'NewRevisionFromEditComplete', array( $this, $nullRevision, $latest, $user ) );
                        wfRunHooks( 'ArticleProtectComplete', array( &$this, &$user, $limit, $reason ) );
                } else { // Protection of non-existing page (also known as "title protection")