From: Stéphane Jacob Date: Fri, 2 Jul 2010 15:04:26 +0000 (+0200) Subject: Adds missing phone prefix. X-Git-Tag: xorg/1.0.1~368 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=f34d8fad2be27166760d80e79b7f82905f31f1ce;p=platal.git Adds missing phone prefix. Signed-off-by: Stéphane Jacob --- 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: */ +?>