Unset the prepared statements used in the app_defaults.php files.

This commit is contained in:
Mark Crane 2014-07-23 22:00:03 +00:00
parent 09ff31ae5a
commit 1613d19c3b
12 changed files with 54 additions and 35 deletions

View File

@ -125,6 +125,7 @@
$db->query($sql);
unset($sql);
}
unset($prep_statement);
}
}
@ -153,6 +154,7 @@
$db->query($sql);
unset($sql);
}
unset($prep_statement);
}
}

View File

@ -45,8 +45,8 @@
$db->exec(check_sql($sql));
unset($sql);
}
}
unset($prep_statement, $result);
}
//move the dynamic provision variables that from v_vars table to v_default_settings
if (count($_SESSION['provision']) == 0 && $domains_processed == 1) {
@ -86,6 +86,7 @@
$db->exec(check_sql($sql));
unset($sql);
}
unset($prep_statement);
//delete the provision variables from system -> variables
//$sql = "delete from v_vars ";
//$sql .= "where var_cat = 'Provision' ";

View File

@ -31,6 +31,7 @@ if (count($_SESSION['email']) == 0 && $domains_processed == 1) {
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
$row = $prep_statement->fetch(PDO::FETCH_NAMED);
unset($prep_statement);
//set the variable
$smtp[]['smtp_host'] = check_str($row['smtp_host']);
$smtp[]['smtp_secure'] = check_str($row['smtp_secure']);

View File

@ -112,6 +112,7 @@
}
}
}
unset($prep_statement);
}
}

View File

@ -108,9 +108,9 @@ EOD;
$x++;
}
}
}
unset($prep_statement, $result);
}
}
//adjust the variables required variables
if ($domains_processed == 1) {
@ -145,6 +145,7 @@ EOD;
$db->exec(check_sql($sql));
unset($sql);
}
unset($prep_statement, $row);
}
//set the transfer_ringback
@ -178,6 +179,7 @@ EOD;
$db->exec(check_sql($sql));
unset($sql);
}
unset($prep_statement, $row);
}
//set variables that depend on the number of domains
@ -221,6 +223,7 @@ EOD;
$db->exec(check_sql($sql));
unset($sql);
}
unset($prep_statement, $row);
}
}

View File

@ -81,6 +81,7 @@
$message = $orm->message;
//print_r($message);
}
unset($row);
}
}

View File

@ -49,6 +49,7 @@ if ($domains_processed == 1) {
$db->exec(check_sql($sql));
unset($sql);
}
unset($prep_statement, $result);
//replace the backslash with a forward slash
$db_path = str_replace("\\", "/", $db_path);
@ -62,6 +63,7 @@ if ($domains_processed == 1) {
if ($prep_statement) {
$prep_statement->execute();
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
unset($prep_statement);
if ($row['num_rows'] > 0) {
$odbc_num_rows = $row['num_rows'];
@ -95,6 +97,7 @@ if ($domains_processed == 1) {
foreach ($result as &$row) {
$recordings_dir = $row["default_setting_value"];
}
unset($prep_statement, $result);
}
//config.lua

View File

@ -60,6 +60,7 @@ if ($domains_processed == 1) {
$db->exec(check_sql($sql));
unset($sql);
}
unset($prep_statement, $row);
}
//ensure that the default password length and strength are set
@ -109,6 +110,7 @@ if ($domains_processed == 1) {
$db->exec(check_sql($sql));
unset($sql);
}
unset($prep_statement, $row);
}
//set the sip_profiles directory for older installs

View File

@ -116,6 +116,7 @@
}
}
}
unset($prep_statement);
}
?>

View File

@ -47,6 +47,7 @@ if (strlen($_SESSION['switch']['scripts']['dir']) > 0) {
$db->exec(check_sql($sql));
unset($sql);
}
unset($prep_statement, $row);
}
}
}

View File

@ -73,6 +73,7 @@ if (strlen($_SESSION['switch']['scripts']['dir']) > 0) {
$db->exec(check_sql($sql));
unset($sql);
}
unset($prep_statement, $row);
}
//ensure the login message is set, if new message exists
@ -84,6 +85,7 @@ if (strlen($_SESSION['switch']['scripts']['dir']) > 0) {
if ($prep_statement) {
$prep_statement->execute();
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
unset($prep_statement);
if ($row['num_rows'] == 0) {
// insert message
@ -141,8 +143,8 @@ if (strlen($_SESSION['switch']['scripts']['dir']) > 0) {
unset($sql);
}
}
unset($prep_statement, $result);
}
unset($sql, $result);
}
}

View File

@ -76,8 +76,8 @@
}
}
}
}
unset($prep_statement, $sub_result);
}
//if there are no permissions listed in v_group_permissions then set the default permissions
$sql = "select count(*) as count from v_group_permissions ";
@ -175,6 +175,7 @@
}
}
}
unset ($prep_statement);
}
//if there are no permissions listed in v_group_permissions then set the default permissions