diff --git a/agc_2-X/trunk/www/vicidial/db_schema_compare.php b/agc_2-X/trunk/www/vicidial/db_schema_compare.php
index 790ce46d..405cca07 100644
--- a/agc_2-X/trunk/www/vicidial/db_schema_compare.php
+++ b/agc_2-X/trunk/www/vicidial/db_schema_compare.php
@@ -41,7 +41,7 @@ if (!isset($server_ip)) {$server_ip = '10.10.10.15';}
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
-$stmt = "SELECT use_non_latin,webroot_writable,outbound_autodial_active,user_territories_active,enable_languages,language_method,allow_shared_dial,qc_features_active,allow_web_debug,slave_db_server,coldstorage_server_ip,coldstorage_dbname,coldstorage_login,coldstorage_pass,coldstorage_port FROM system_settings;";
+$stmt = "SELECT use_non_latin,webroot_writable,outbound_autodial_active,user_territories_active,enable_languages,language_method,allow_shared_dial,qc_features_active,allow_web_debug,slave_db_server,coldstorage_server_ip,coldstorage_dbname,coldstorage_login,coldstorage_pass,coldstorage_port,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass FROM system_settings;";
$rslt=mysql_to_mysqli($stmt, $link);
#if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysqli_num_rows($rslt);
@@ -63,6 +63,10 @@ if ($qm_conf_ct > 0)
$SScoldstorage_login = $row[12];
$SScoldstorage_pass = $row[13];
$SScoldstorage_port = $row[14];
+ $SSalt_log_server_ip = $row[15];
+ $SSalt_log_dbname = $row[16];
+ $SSalt_log_login = $row[17];
+ $SSalt_log_pass = $row[18];
}
if ($SSallow_web_debug < 1) {$DB=0;}
##### END SETTINGS LOOKUP #####
@@ -340,6 +344,8 @@ if ( ($stage == 'empty') or (strlen($stage) < 1) )
echo "";
echo " \n";
echo "\n\n";
@@ -387,7 +393,6 @@ else
{
$CSserver_string = $SScoldstorage_server_ip;
$linkCS = mysqli_connect("$SScoldstorage_server_ip", "$SScoldstorage_login", "$SScoldstorage_pass", "$SScoldstorage_dbname", $SScoldstorage_port);
- if (!$linkCS) {echo "MySQL Cold-Storage connect ERROR: " . mysqli_connect_error();}
}
else
{
@@ -395,6 +400,50 @@ else
exit;
}
}
+ if ($stage == 'ALT_LOG_SECONDARY')
+ {
+ if (strlen($SSalt_log_server_ip)>4)
+ {
+ if (preg_match("/\:/", $SSalt_log_server_ip))
+ {
+ $temp_slave_db = explode(':',$SSalt_log_server_ip);
+ $CSserver_string = $temp_slave_db[0];
+ $VARDB_port = $temp_slave_db[1];
+ }
+ else
+ {
+ $CSserver_string = $SSalt_log_server_ip;
+ }
+ $linkCS=mysqli_connect($CSserver_string, "$VARDB_user", "$VARDB_pass", "$VARDB_database", $VARDB_port);
+ }
+ else
+ {
+ echo "Error: no alt-log secondary server: $SSalt_log_server_ip \n";
+ exit;
+ }
+ }
+ if ($stage == 'ALT_LOG')
+ {
+ if (strlen($SSalt_log_server_ip)>4)
+ {
+ if (preg_match("/\:/", $SSalt_log_server_ip))
+ {
+ $temp_slave_db = explode(':',$SSalt_log_server_ip);
+ $CSserver_string = $temp_slave_db[0];
+ $VARDB_port = $temp_slave_db[1];
+ }
+ else
+ {
+ $CSserver_string = $SSalt_log_server_ip;
+ }
+ $linkCS=mysqli_connect($CSserver_string, "$SSalt_log_login", "$SSalt_log_pass", "$SSalt_log_dbname", $VARDB_port);
+ }
+ else
+ {
+ echo "Error: no alt-log server: $SSalt_log_server_ip \n";
+ exit;
+ }
+ }
if (!$linkCS)
{
@@ -579,515 +628,3 @@ else
echo "