mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Add default settings
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
Portions created by the Initial Developer are Copyright (C) 2008-2014
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
@@ -30,8 +30,54 @@ if (count($_SESSION['email']) == 0 && $domains_processed == 1) {
|
|||||||
$sql = "select * from v_settings ";
|
$sql = "select * from v_settings ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
|
if ($prep_statement) {
|
||||||
$row = $prep_statement->fetch(PDO::FETCH_NAMED);
|
$row = $prep_statement->fetch(PDO::FETCH_NAMED);
|
||||||
unset($prep_statement);
|
unset($prep_statement);
|
||||||
|
}
|
||||||
|
|
||||||
|
//check the row count
|
||||||
|
if (count($row) == 0) {
|
||||||
|
//add default settings
|
||||||
|
$event_socket_ip_address = "127.0.0.1";
|
||||||
|
$event_socket_port = "8021";
|
||||||
|
$event_socket_password = "ClueCon";
|
||||||
|
$xml_rpc_http_port = "8787";
|
||||||
|
$xml_rpc_auth_realm = "freeswitch";
|
||||||
|
$xml_rpc_auth_user = "freeswitch";
|
||||||
|
$xml_rpc_auth_pass = "works";
|
||||||
|
$mod_shout_decoder = "";
|
||||||
|
$mod_shout_volume = "0.3";
|
||||||
|
|
||||||
|
$sql = "insert into v_settings ";
|
||||||
|
$sql .= "(";
|
||||||
|
$sql .= "setting_uuid, ";
|
||||||
|
$sql .= "event_socket_ip_address, ";
|
||||||
|
$sql .= "event_socket_port, ";
|
||||||
|
$sql .= "event_socket_password, ";
|
||||||
|
$sql .= "xml_rpc_http_port, ";
|
||||||
|
$sql .= "xml_rpc_auth_realm, ";
|
||||||
|
$sql .= "xml_rpc_auth_user, ";
|
||||||
|
$sql .= "xml_rpc_auth_pass, ";
|
||||||
|
$sql .= "mod_shout_decoder, ";
|
||||||
|
$sql .= "mod_shout_volume ";
|
||||||
|
$sql .= ")";
|
||||||
|
$sql .= "values ";
|
||||||
|
$sql .= "(";
|
||||||
|
$sql .= "'".uuid()."', ";
|
||||||
|
$sql .= "'$event_socket_ip_address', ";
|
||||||
|
$sql .= "'$event_socket_port', ";
|
||||||
|
$sql .= "'$event_socket_password', ";
|
||||||
|
$sql .= "'$xml_rpc_http_port', ";
|
||||||
|
$sql .= "'$xml_rpc_auth_realm', ";
|
||||||
|
$sql .= "'$xml_rpc_auth_user', ";
|
||||||
|
$sql .= "'$xml_rpc_auth_pass', ";
|
||||||
|
$sql .= "'$mod_shout_decoder', ";
|
||||||
|
$sql .= "'$mod_shout_volume' ";
|
||||||
|
$sql .= ")";
|
||||||
|
$db->exec(check_sql($sql));
|
||||||
|
unset($sql);
|
||||||
|
}
|
||||||
|
else {
|
||||||
//set the variable
|
//set the variable
|
||||||
$smtp[]['smtp_host'] = check_str($row['smtp_host']);
|
$smtp[]['smtp_host'] = check_str($row['smtp_host']);
|
||||||
$smtp[]['smtp_secure'] = check_str($row['smtp_secure']);
|
$smtp[]['smtp_secure'] = check_str($row['smtp_secure']);
|
||||||
@@ -69,6 +115,7 @@ if (count($_SESSION['email']) == 0 && $domains_processed == 1) {
|
|||||||
unset($sql);
|
unset($sql);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
Reference in New Issue
Block a user