Hide Device Provisioning on the extensions page if app/devices is not installed.
This commit is contained in:
parent
2eabe478f2
commit
2e2c31eb36
|
|
@ -111,6 +111,7 @@ else {
|
|||
}
|
||||
|
||||
//delete the line from the v_device_lines
|
||||
if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/devices')) {
|
||||
if ($_GET["a"] == "delete" && strlen($_REQUEST["device_line_uuid"]) > 0 && permission_exists("extension_delete")) {
|
||||
//set the variables
|
||||
$extension_uuid = check_str($_REQUEST["id"]);
|
||||
|
|
@ -126,6 +127,7 @@ else {
|
|||
header("Location: extension_edit.php?id=".$extension_uuid);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//assign the extension to the user
|
||||
if (strlen($_REQUEST["user_uuid"]) > 0 && strlen($_REQUEST["id"]) > 0 && $_GET["a"] != "delete") {
|
||||
|
|
@ -155,6 +157,7 @@ else {
|
|||
}
|
||||
|
||||
//assign the line to the device
|
||||
if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/devices')) {
|
||||
if (strlen($_REQUEST["device_mac_address"]) > 0 && strlen($_REQUEST["id"]) > 0 && $_GET["a"] != "delete") {
|
||||
//set the variables
|
||||
$extension_uuid = check_str($_REQUEST["id"]);
|
||||
|
|
@ -233,6 +236,7 @@ else {
|
|||
header("Location: extension_edit.php?id=".$extension_uuid);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
|
|
@ -579,8 +583,10 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
}
|
||||
|
||||
//write the provision files
|
||||
if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/provision')) {
|
||||
require_once "app/provision/provision_write.php";
|
||||
$ext = new extension;
|
||||
}
|
||||
|
||||
//delete extension from memcache
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
|
|
@ -1133,6 +1139,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
echo "</tr>\n";
|
||||
|
||||
if ($action == "update") {
|
||||
if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/devices')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-provisioning'].":\n";
|
||||
|
|
@ -1329,6 +1336,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
}
|
||||
|
||||
if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/voicemails')) {
|
||||
echo "<tr>\n";
|
||||
|
|
|
|||
Loading…
Reference in New Issue