Update gateway_delete.php
This commit is contained in:
parent
7ba3fd49c5
commit
3841c6f51c
|
|
@ -23,22 +23,26 @@
|
|||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
include "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
if (permission_exists('gateway_delete')) {
|
||||
//includes
|
||||
include "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
if (permission_exists('gateway_delete')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
if (strlen($_GET["id"])>0) {
|
||||
//delete the gateway
|
||||
if (is_array($_GET["id"])) {
|
||||
//set the variable
|
||||
$id = check_str($_GET["id"]);
|
||||
|
||||
|
|
@ -91,11 +95,13 @@ if (strlen($_GET["id"])>0) {
|
|||
$cache = new cache;
|
||||
$cache->delete("configuration:sofia.conf:".$hostname);
|
||||
|
||||
//rescan the sip profile to look for new or stopped gateways
|
||||
|
||||
//create the event socket connection and send a command
|
||||
if (!$fp) {
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
}
|
||||
|
||||
//rescan the sip profile to look for new or stopped gateways
|
||||
if ($fp) {
|
||||
//send the api commandover event socket
|
||||
$cmd = 'api sofia profile '.$profile.' rescan';
|
||||
|
|
@ -108,7 +114,7 @@ if (strlen($_GET["id"])>0) {
|
|||
|
||||
//clear the apply settings reminder
|
||||
$_SESSION["reload_xml"] = false;
|
||||
}
|
||||
}
|
||||
|
||||
//redirect the users
|
||||
message::add($text['message-delete']);
|
||||
|
|
|
|||
Loading…
Reference in New Issue