Revision: 4188
Author:
ma...@venturevoip.com
Date: Thu Apr 11 09:17:39 2013
Log: Add a field to determine whether that means not contacted
http://code.google.com/p/smoothoperator/source/detail?r=4188
Modified:
/SmoothOperatorCRM/functions/database.php
=======================================
--- /SmoothOperatorCRM/functions/database.php Wed Apr 10 07:09:58 2013
+++ /SmoothOperatorCRM/functions/database.php Thu Apr 11 09:17:39 2013
@@ -116,10 +116,25 @@
`id` int(11) NOT NULL auto_increment,
`text` text default NULL,
`job_id` int(11) default NULL,
+ `not_contacted` int(11) default 0,
PRIMARY KEY (`id`)
) ENGINE=InnoDB";
$result = mysqli_query($link, $sql);
}
+
+ $fields = mysql_list_fields('SineDialer', 'job_dispositions');
+ $columns = mysql_num_fields($fields);
+ for ($i = 0; $i < $columns; $i++) {
+ $field_array[] = mysql_field_name($fields, $i);
+ }
+
+ if (!in_array('not_contacted', $field_array))
+ {
+ $result = mysqli_query($link, 'ALTER TABLE job_dispositions ADD
not_contacted int(10) default 0');
+ $sql = "INSERT INTO log (timestamp, username, activity) VALUES
(NOW(), '$_POST[user]', 'Added job_dispositions not_contacted field')";
+ $result=mysqli_query($link, $sql, $link);
+ }
+
/* Create the remote_callcenter table if missing */
if (!mysqli_is_table($host, $user,
$pass,"SmoothOperator", "remote_callcenter")) {