From: Marius Hoch Date: Wed, 25 Sep 2013 20:50:54 +0000 (+0200) Subject: Clear legacy restriction field on page restriction update X-Git-Tag: 1.31.0-rc.0~18679^2 X-Git-Url: http://git.cyclocoop.org/%22%2C%20generer_url_ecrire%28?a=commitdiff_plain;h=a906177c2047f8bb62a333d9baf3d5a7b9a7c7c3;p=lhc%2Fweb%2Fwiklou.git Clear legacy restriction field on page restriction update This causes problems where some pages can't be unprotected as we still take the legacy field into account. See also bug 33334. Change-Id: Ibaec827289b1070ee110635d6c9d7b60e061384b --- diff --git a/includes/WikiPage.php b/includes/WikiPage.php index bfa9956e0c..2265aca3ab 100644 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@ -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")