From f34d8fad2be27166760d80e79b7f82905f31f1ce Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Fri, 2 Jul 2010 17:04:26 +0200 Subject: [PATCH] Adds missing phone prefix. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- upgrade/1.0.1/connect.db.inc.php | 1 + upgrade/1.0.1/phone.php | 58 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 120000 upgrade/1.0.1/connect.db.inc.php create mode 100755 upgrade/1.0.1/phone.php diff --git a/upgrade/1.0.1/connect.db.inc.php b/upgrade/1.0.1/connect.db.inc.php new file mode 120000 index 0000000..442fab7 --- /dev/null +++ b/upgrade/1.0.1/connect.db.inc.php @@ -0,0 +1 @@ +../../bin/connect.db.inc.php \ No newline at end of file diff --git a/upgrade/1.0.1/phone.php b/upgrade/1.0.1/phone.php new file mode 100755 index 0000000..4239ece --- /dev/null +++ b/upgrade/1.0.1/phone.php @@ -0,0 +1,58 @@ +#!/usr/bin/php5 +debug = 0; //do not store backtraces + +$phones = array( + 'AF' => '93', + 'AN' => '599', + 'BY' => '375', + 'FM' => '691', + 'GE' => '995', + 'GL' => '299', + 'ID' => '62', + 'IL' => '972', + 'IN' => '91', + 'IQ' => '964', + 'IR' => '98', + 'JO' => '962', + 'JP' => '81', + 'KG' => '996', + 'KW' => '965', + 'KZ' => '7', + 'LA' => '856', + 'LB' => '961', + 'LK' => '94', + 'MM' => '95', + 'MN' => '976', + 'MV' => '960', + 'MY' => '60', + 'NP' => '977', + 'OM' => '968', + 'PH' => '63', + 'PK' => '92', + 'QA' => '974', + 'SA' => '966', + 'SG' => '65', + 'SY' => '963', + 'TH' => '66', + 'TJ' => '992', + 'TM' => '993', + 'TR' => '90', + 'TW' => '886', + 'UZ' => '998', + 'VG' => '1284', + 'VN' => '84', + 'YE' => '967', +); + +foreach ($phones as $country => $phone) { + XDB::execute('UPDATE geoloc_countries + SET phonePrefix = {?} + WHERE iso_3166_1_a2 = {?}', + $phone, $country); +} + +/* vim:set et sw=4 sts=4 ts=4: */ +?> -- 2.1.4