From 35eab7826e0fd346169ea51c0d3104b87a12da40 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Sat, 15 Oct 2016 12:26:45 -0700 Subject: [PATCH] addRFCandPMIDInterwiki: Fix strict mode errors Those columns have no defaults and cause errors if MySQL strict mode is enabled. Also make this maintenance script runnable standalone. Bug: T147536 Change-Id: I0f0ba6fc4375c44b71852c5c2dad8336db17c479 --- maintenance/addRFCandPMIDInterwiki.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/maintenance/addRFCandPMIDInterwiki.php b/maintenance/addRFCandPMIDInterwiki.php index 9740ef2d79..2262338ad3 100644 --- a/maintenance/addRFCandPMIDInterwiki.php +++ b/maintenance/addRFCandPMIDInterwiki.php @@ -63,7 +63,10 @@ class AddRFCAndPMIDInterwiki extends LoggedUpdateMaintenance { [ 'iw_prefix' ], [ 'iw_prefix' => 'rfc', - 'iw_url' => 'https://tools.ietf.org/html/rfc$1' + 'iw_url' => 'https://tools.ietf.org/html/rfc$1', + 'iw_api' => '', + 'iw_wikiid' => '', + 'iw_local' => 0, ], __METHOD__ ); @@ -74,6 +77,9 @@ class AddRFCAndPMIDInterwiki extends LoggedUpdateMaintenance { [ 'iw_prefix' => 'pmid', 'iw_url' => 'https://www.ncbi.nlm.nih.gov/pubmed/$1?dopt=Abstract', + 'iw_api' => '', + 'iw_wikiid' => '', + 'iw_local' => 0, ], __METHOD__, // If there's already a pmid interwiki link, don't @@ -84,3 +90,6 @@ class AddRFCAndPMIDInterwiki extends LoggedUpdateMaintenance { return true; } } + +$maintClass = 'AddRFCAndPMIDInterwiki'; +require_once RUN_MAINTENANCE_IF_MAIN; -- 2.20.1