From: Alan Pippin <apippin@pippins.net>
Date: Mon, 13 Sep 2010 18:32:32 +0000 (-0600)
Subject: Added default values for interview_pri and visit_pri and changed the default value... 
X-Git-Tag: release_1_0_0~49
X-Git-Url: http://git.pippins.net/images/static/git-favicon.png?a=commitdiff_plain;h=3d1f26bd872559159627649482bde948420073a1;p=eq%2F.git

Added default values for interview_pri and visit_pri and changed the default value to be 30 instead of 1.
---

diff --git a/bin/import_ward_data b/bin/import_ward_data
index 7e8b7ac..fe2cf3e 100755
--- a/bin/import_ward_data
+++ b/bin/import_ward_data
@@ -160,7 +160,7 @@ sub update_tc_indiv_table
 	if($rows == 0) {
 	    # No existing records found for this indiv, make a new entry
 	    print "   Adding new indiv: $indiv_name\n";
-	    $sth = $dbh->prepare("insert into tc_indiv values (NULL,'$id',\"$indiv_name\",'$year-$month-$day','$address','$phone','$email','','$hhposition','$priesthood','','1','','1','',$attending,1)");
+	    $sth = $dbh->prepare("insert into tc_indiv values (NULL,'$id',\"$indiv_name\",'$year-$month-$day','$address','$phone','$email','','$hhposition','$priesthood','','$default_interview_pri','','$default_interview_pri','',$attending,1)");
 	    $sth->execute or die "-E- DB error: $DBI::errstr\n";
 	} elsif($rows == 1) {
 	    # An existing record was found for this indiv, update it
@@ -381,7 +381,7 @@ sub update_tc_family_table
 		if($rows == 0) {
 		    # No existing records found for this family, make a new entry
 		    print "   Adding new Family: $family_name\n";
-		    $sth = $dbh->prepare("insert into tc_family values (NULL,$id,'$family_name','$name_id','0','0','1','',1)");
+		    $sth = $dbh->prepare("insert into tc_family values (NULL,$id,'$family_name','$name_id','0','0','$default_visit_pri','',1)");
 		    $sth->execute or die "-E- DB error: $DBI::errstr\n";
 		} elsif($rows == 1) {
 		    # An existing record was found for this family, update it
diff --git a/setup/db_config b/setup/db_config
index 9cef5a4..0036f13 100644
--- a/setup/db_config
+++ b/setup/db_config
@@ -10,5 +10,7 @@ $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";
 
+$areacode = "970";
+$default_visit_pri = 30;
+$default_interview_pri = 30;