From: Alan J. Pippin Date: Fri, 10 Sep 2010 04:10:16 +0000 (-0600) Subject: Changed hard coded areacode number into a configurable variable X-Git-Tag: release_0_4_0~4 X-Git-Url: http://git.pippins.net/embedvideo/.git/?a=commitdiff_plain;h=5b6a77efbd41b615baf86ca2222e3b1c08fe106f;p=eq%2F.git Changed hard coded areacode number into a configurable variable --- diff --git a/bin/import_ward_data b/bin/import_ward_data index bf970a2..ef7eac4 100755 --- a/bin/import_ward_data +++ b/bin/import_ward_data @@ -97,7 +97,7 @@ sub update_eq_aaronic_table $membership_data{$index}{$key} =~ /^Priest\s*$/i)) { $aaronic_name = $membership_data{$index}{'Preferred Name'}; $phone = $membership_data{$index}{'Phone 1'}; - if($phone =~ /(\d\d\d-\d\d\d\d)/) { $phone = "970-$1"; } + if($phone =~ /(\d\d\d-\d\d\d\d)/) { $phone = "$areacode-$1"; } if($phone =~ /^\(\d\d\d\) (\d\d\d-\d\d\d\d)/) { $phone = "$1-$2"; } $sth = $dbh->prepare("select * from eq_aaronic where name='$aaronic_name'"); $sth->execute or die "-E- DB error: $DBI::errstr\n"; @@ -165,7 +165,7 @@ sub update_eq_elder_table ($organization =~ /Sunday School/) || ($organization =~ /Primary/) ) { $attending = 1; } - if($phone =~ /(\d\d\d-\d\d\d\d)/) { $phone = "970-$1"; } + if($phone =~ /(\d\d\d-\d\d\d\d)/) { $phone = "$areacode-$1"; } if($phone =~ /^\(\d\d\d\) (\d\d\d-\d\d\d\d)/) { $phone = "$1-$2"; } $sth = $dbh->prepare("select * from eq_elder where name='$elder_name'"); $sth->execute or die "-E- DB error: $DBI::errstr\n"; @@ -497,7 +497,7 @@ sub update_eq_parent_table $hofh_id = $membership_data{$index}{'HofH ID'}; $id = $membership_data{$index}{'Indiv ID'}; $phone = $membership_data{$index}{'Phone 1'}; - if($phone =~ /(\d\d\d-\d\d\d\d)/) { $phone = "970-$1"; } + if($phone =~ /(\d\d\d-\d\d\d\d)/) { $phone = "$areacode-$1"; } if($phone =~ /^\(\d\d\d\) (\d\d\d-\d\d\d\d)/) { $phone = "$1-$2"; } $address = $membership_data{$index}{'Street 1'}; if($membership_data{$index}{'Street 2'} ne "") { diff --git a/setup/db_config b/setup/db_config index 485df6c..085075f 100644 --- a/setup/db_config +++ b/setup/db_config @@ -10,4 +10,5 @@ $dbhost = "192.168.0.4"; # This can be an IP address or name $dbport = 3306; $dbuser = "phpgroupware"; # This may require an additional '\@localhost' $dbpass = "phpgroupware"; +$areacode = "970";