diff --git a/app/extensions/extension_edit.php b/app/extensions/extension_edit.php
index a0920ae45a..500521eddb 100644
--- a/app/extensions/extension_edit.php
+++ b/app/extensions/extension_edit.php
@@ -405,12 +405,16 @@
if (permission_exists("emergency_caller_id_number")) {
$array["extensions"][$i]["emergency_caller_id_number"] = $emergency_caller_id_number;
}
- $array["extensions"][$i]["directory_first_name"] = $directory_first_name;
- $array["extensions"][$i]["directory_last_name"] = $directory_last_name;
- $array["extensions"][$i]["directory_visible"] = $directory_visible;
- $array["extensions"][$i]["directory_exten_visible"] = $directory_exten_visible;
- $array["extensions"][$i]["limit_max"] = $limit_max;
- $array["extensions"][$i]["limit_destination"] = $limit_destination;
+ if (permission_exists("extension_directory")) {
+ $array["extensions"][$i]["directory_first_name"] = $directory_first_name;
+ $array["extensions"][$i]["directory_last_name"] = $directory_last_name;
+ $array["extensions"][$i]["directory_visible"] = $directory_visible;
+ $array["extensions"][$i]["directory_exten_visible"] = $directory_exten_visible;
+ }
+ if (permission_exists("extension_limit")) {
+ $array["extensions"][$i]["limit_max"] = $limit_max;
+ $array["extensions"][$i]["limit_destination"] = $limit_destination;
+ }
if (permission_exists("extension_user_context")) {
$array["extensions"][$i]["user_context"] = $user_context;
}
@@ -429,12 +433,16 @@
if (strlen($call_timeout) > 0) {
$array["extensions"][$i]["call_timeout"] = $call_timeout;
}
- $array["extensions"][$i]["call_group"] = $call_group;
+ if (permission_exists("extension_call_group")) {
+ $array["extensions"][$i]["call_group"] = $call_group;
+ }
$array["extensions"][$i]["call_screen_enabled"] = $call_screen_enabled;
if (permission_exists('extension_user_record')) {
$array["extensions"][$i]["user_record"] = $user_record;
}
- $array["extensions"][$i]["hold_music"] = $hold_music;
+ if (permission_exists('extension_hold_music')) {
+ $array["extensions"][$i]["hold_music"] = $hold_music;
+ }
$array["extensions"][$i]["auth_acl"] = $auth_acl;
if (permission_exists("extension_cidr")) {
$array["extensions"][$i]["cidr"] = $cidr;
@@ -1468,89 +1476,93 @@
echo "\n";
}
- echo "
\n";
- echo "| \n";
- echo " ".$text['label-directory_full_name']."\n";
- echo " | \n";
- echo "\n";
- echo " \n";
- echo " \n";
- echo " \n";
- echo $text['description-directory_full_name']."\n";
- echo " | \n";
- echo "
\n";
+ if (permission_exists("extension_directory")) {
+ echo "\n";
+ echo "| \n";
+ echo " ".$text['label-directory_full_name']."\n";
+ echo " | \n";
+ echo "\n";
+ echo " \n";
+ echo " \n";
+ echo " \n";
+ echo $text['description-directory_full_name']."\n";
+ echo " | \n";
+ echo "
\n";
- echo "\n";
- echo "| \n";
- echo " ".$text['label-directory_visible']."\n";
- echo " | \n";
- echo "\n";
- echo " \n";
- echo " \n";
- echo " \n";
- echo $text['description-directory_visible']."\n";
- echo " | \n";
- echo "
\n";
+ echo "\n";
+ echo "| \n";
+ echo " ".$text['label-directory_visible']."\n";
+ echo " | \n";
+ echo "\n";
+ echo " \n";
+ echo " \n";
+ echo " \n";
+ echo $text['description-directory_visible']."\n";
+ echo " | \n";
+ echo "
\n";
- echo "\n";
- echo "| \n";
- echo " ".$text['label-directory_exten_visible']."\n";
- echo " | \n";
- echo "\n";
- echo " \n";
- echo " \n";
- echo " \n";
- echo $text['description-directory_exten_visible']."\n";
- echo " | \n";
- echo "
\n";
- echo "\n";
- echo "| \n";
- echo " ".$text['label-limit_max']."\n";
- echo " | \n";
- echo "\n";
- echo " \n";
- echo " \n";
- echo $text['description-limit_max']."\n";
- echo " | \n";
- echo "
\n";
+ if (permission_exists("extension_limit")) {
+ echo "\n";
+ echo "| \n";
+ echo " ".$text['label-limit_max']."\n";
+ echo " | \n";
+ echo "\n";
+ echo " \n";
+ echo " \n";
+ echo $text['description-limit_max']."\n";
+ echo " | \n";
+ echo "
\n";
- echo "\n";
- echo "| \n";
- echo " ".$text['label-limit_destination']."\n";
- echo " | \n";
- echo "\n";
- echo " \n";
- echo " \n";
- echo $text['description-limit_destination']."\n";
- echo " | \n";
- echo "
\n";
+ echo "\n";
+ echo "| \n";
+ echo " ".$text['label-limit_destination']."\n";
+ echo " | \n";
+ echo "\n";
+ echo " \n";
+ echo " \n";
+ echo $text['description-limit_destination']."\n";
+ echo " | \n";
+ echo "
\n";
+ }
if (permission_exists('voicemail_edit') && is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/voicemails')) {
echo "\n";
@@ -1679,30 +1691,32 @@
echo "\n";
echo "
\n";
- echo "\n";
- echo "| \n";
- echo " ".$text['label-call_group']."\n";
- echo " | \n";
- echo "\n";
- if (is_array($_SESSION['call group']['name'])) {
- echo " \n";
- echo " \n";
- foreach ($_SESSION['call group']['name'] as $name) {
- if ($name == $call_group) {
- echo " \n";
- }
- else {
- echo " \n";
+ if (permission_exists("extension_call_group")) {
+ echo "\n";
+ echo "| \n";
+ echo " ".$text['label-call_group']."\n";
+ echo " | \n";
+ echo "\n";
+ if (is_array($_SESSION['call group']['name'])) {
+ echo " \n";
+ echo " \n";
+ foreach ($_SESSION['call group']['name'] as $name) {
+ if ($name == $call_group) {
+ echo " \n";
+ }
+ else {
+ echo " \n";
+ }
}
+ echo " \n";
+ } else {
+ echo " \n";
}
- echo " \n";
- } else {
- echo " \n";
+ echo " \n";
+ echo $text['description-call_group']."\n";
+ echo " | \n";
+ echo " \n";
}
- echo " \n";
- echo $text['description-call_group']."\n";
- echo " | \n";
- echo "
\n";
if (permission_exists('extension_call_screen')) {
echo "\n";
@@ -1769,7 +1783,7 @@
echo "
\n";
}
- if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/music_on_hold')) {
+ if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/music_on_hold') && permission_exists('extension_hold_music')) {
echo "\n";
echo "| \n";
echo " ".$text['label-hold_music']."\n";
|