From d7b8f505199d8be1bc2abfe5705c1b7d500f5989 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 3 Dec 2007 19:16:56 +0000 Subject: [PATCH] * Graceful behavior for updateRestrictions.php if a page already has records in the page_restrictions matching its old page_restrictions field. May help with odd upgrade issues or race condition. --- RELEASE-NOTES | 4 ++++ maintenance/updateRestrictions.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index fd07d25932..caf62ac1e6 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -207,6 +207,10 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN instead of a Traditional conversion with Taiwan variant, and a Simplified conversion with China variant. * (bug 12178) Fix wpReason parameter to action=delete, again. +* Graceful behavior for updateRestrictions.php if a page already has records + in the page_restrictions matching its old page_restrictions field. + May help with odd upgrade issues or race condition. + == Parser changes in 1.12 == diff --git a/maintenance/updateRestrictions.php b/maintenance/updateRestrictions.php index 9503d0b787..c8cebfc48d 100644 --- a/maintenance/updateRestrictions.php +++ b/maintenance/updateRestrictions.php @@ -56,7 +56,7 @@ function migrate_page_restrictions( $db ) { # We use insert() and not replace() as Article.php replaces # page_restrictions with '' when protected in the restrictions table if ( count( $batch ) ) { - $db->insert( 'page_restrictions', $batch, __FUNCTION__ ); + $db->insert( 'page_restrictions', $batch, __FUNCTION__, array( 'IGNORE' ) ); } $blockStart += BATCH_SIZE; $blockEnd += BATCH_SIZE; -- 2.20.1