Run the users app defaults only once.

This commit is contained in:
Mark Crane 2014-12-26 15:47:37 +00:00
parent b9bb32f4bd
commit d573aa8b0b
1 changed files with 141 additions and 139 deletions

View File

@ -24,6 +24,7 @@
Mark J Crane <markjcrane@fusionpbx.com>
*/
if ($domains_processed == 1) {
//if the are no groups add the default groups
$sql = "SELECT * FROM v_groups ";
$sql .= "WHERE domain_uuid = 'null' ";
@ -135,7 +136,7 @@
//get the group_uuid
$sql = "select group_uuid from v_groups ";
$sql .= "where group_name = '".$row['group_name']."' ";
$sql .= "and domain_uuid = '".$row['domain_uuid']."' ";
//$sql .= "and domain_uuid = '".$row['domain_uuid']."' ";
$prep_statement_sub = $db->prepare($sql);
$prep_statement_sub->execute();
$sub_result = $prep_statement_sub->fetch(PDO::FETCH_ASSOC);
@ -171,5 +172,6 @@
$db->exec($sql);
unset($sql);
}
}
?>