Fix a bug where XMPP wrote the XML file but for each loop deleted the previous XML file.

This commit is contained in:
Mark Crane
2012-08-22 04:22:09 +00:00
parent 9f0b5612ca
commit 036b3315dd
2 changed files with 1 additions and 8 deletions

View File

@@ -59,8 +59,7 @@ foreach ($result as &$row) {
$profile = $profiles_array[0];
unset ($prep_statement);
$sql = "";
$sql .= "delete from v_xmpp ";
$sql = "delete from v_xmpp ";
$sql .= "where domain_uuid = '$domain_uuid' ";
$sql .= "and xmpp_profile_uuid = '$profile_id' ";
$db->exec(check_sql($sql));

View File

@@ -197,12 +197,6 @@ elseif ($action == "update" && permission_exists('xmpp_edit')) {
$xmpp_profile_uuid = $request['id'];
}
//prepare the xmpp files to be written. delete all jingle files that are prefixed with v_ and have a file extension of .xml
$jingle_list = glob($_SESSION['switch']['conf']['dir'] . "/jingle_profiles/*v_*.xml");
foreach($jingle_list as $name => $value) {
unlink($value);
}
if ($request['enabled'] == "true") {
//prepare the xml
include "client_template.php";