From 11bb2103bce5618cd66d470f419cad2abfefe61f Mon Sep 17 00:00:00 2001 From: Nate Date: Sat, 15 Feb 2020 11:35:15 -0700 Subject: [PATCH] Ring Groups: Remove deprecated delete script. --- app/ring_groups/ring_group_delete.php | 100 -------------------------- 1 file changed, 100 deletions(-) delete mode 100644 app/ring_groups/ring_group_delete.php diff --git a/app/ring_groups/ring_group_delete.php b/app/ring_groups/ring_group_delete.php deleted file mode 100644 index b3a2015f35..0000000000 --- a/app/ring_groups/ring_group_delete.php +++ /dev/null @@ -1,100 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2019 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane - James Rose -*/ -//includes - require_once "root.php"; - require_once "resources/require.php"; - require_once "resources/check_auth.php"; - -//check permissions - if (permission_exists('ring_group_delete')) { - //access granted - } - else { - echo "access denied"; - exit; - } - -//add multi-lingual support - $language = new text; - $text = $language->get(); - -//get the http value and set it as a php variable - $ring_group_uuid = $_GET["id"]; - -//delete the user data - if (is_uuid($ring_group_uuid)) { - - //get the dialplan_uuid - $sql = "select * from v_ring_groups "; - $sql .= "where ring_group_uuid = :ring_group_uuid "; - $parameters['ring_group_uuid'] = $ring_group_uuid; - $database = new database; - $row = $database->select($sql, $parameters, 'row'); - if (is_array($row) && @sizeof($row) != 0) { - $dialplan_uuid = $row["dialplan_uuid"]; - $ring_group_context = $row["ring_group_context"]; - } - unset($sql, $parameters, $row); - - //add the dialplan permission - $p = new permissions; - $p->add('dialplan_delete', 'temp'); - - //delete the data - $array['dialplan_details'][]['dialplan_uuid'] = $dialplan_uuid; - $array['dialplans'][]['dialplan_uuid'] = $dialplan_uuid; - $array['ring_group_destinations'][]['ring_group_uuid'] = $ring_group_uuid; - $array['ring_group_users'][]['ring_group_uuid'] = $ring_group_uuid; - $array['ring_groups'][]['ring_group_uuid'] = $ring_group_uuid; - $database = new database; - $database->app_name = 'ring_groups'; - $database->app_uuid = '1d61fb65-1eec-bc73-a6ee-a6203b4fe6f2'; - $database->delete($array); - //$message = $database->message; - - //remove the temporary permission - $p->delete('dialplan_delete', 'temp'); - - //save the xml - save_dialplan_xml(); - - //apply settings reminder - $_SESSION["reload_xml"] = true; - - //clear the cache - $cache = new cache; - $cache->delete("dialplan:".$ring_group_context); - - //set message - message::add($text['message-delete']); - } - -//redirect the user - header("Location: ring_groups.php"); - exit; - -?>