Change from if_group to if_permission which is preferred in most cases.
This commit is contained in:
@@ -354,7 +354,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||||||
echo " ".$text['label-greeting']."\n";
|
echo " ".$text['label-greeting']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
if (if_group("superadmin")) {
|
if (permission_exists('conference_center_add') || permission_exists('conference_center_edit')) {
|
||||||
echo "<script>\n";
|
echo "<script>\n";
|
||||||
echo "var Objs;\n";
|
echo "var Objs;\n";
|
||||||
echo "\n";
|
echo "\n";
|
||||||
@@ -385,7 +385,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||||||
echo "</script>\n";
|
echo "</script>\n";
|
||||||
echo "\n";
|
echo "\n";
|
||||||
}
|
}
|
||||||
echo " <select name='conference_center_greeting' class='formfld' ".((if_group("superadmin")) ? "onchange='changeToInput(this);'" : null).">\n";
|
|
||||||
|
echo " <select name='conference_center_greeting' class='formfld' ".((permission_exists('conference_center_add') || permission_exists('conference_center_edit')) ? "onchange='changeToInput(this);'" : null).">\n";
|
||||||
echo " <option></option>\n";
|
echo " <option></option>\n";
|
||||||
//recordings
|
//recordings
|
||||||
if($dh = opendir($_SESSION['switch']['recordings']['dir']."/")) {
|
if($dh = opendir($_SESSION['switch']['recordings']['dir']."/")) {
|
||||||
@@ -438,7 +439,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||||||
}
|
}
|
||||||
//select
|
//select
|
||||||
if (strlen($conference_center_greeting) > 0) {
|
if (strlen($conference_center_greeting) > 0) {
|
||||||
if (if_group("superadmin")) {
|
if (permission_exists('conference_center_add') || permission_exists('conference_center_edit')) {
|
||||||
if (!$tmp_selected) {
|
if (!$tmp_selected) {
|
||||||
echo "<optgroup label='selected'>\n";
|
echo "<optgroup label='selected'>\n";
|
||||||
if (file_exists($_SESSION['switch']['recordings']['dir']."/".$conference_center_greeting)) {
|
if (file_exists($_SESSION['switch']['recordings']['dir']."/".$conference_center_greeting)) {
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ else {
|
|||||||
echo "<br /><br />\n";
|
echo "<br /><br />\n";
|
||||||
|
|
||||||
//prepare to page the results
|
//prepare to page the results
|
||||||
if (if_group("superadmin") || if_group("admin")) {
|
if (permission_exists('conference_center_add') || permission_exists('conference_center_edit')) {
|
||||||
//show all extensions
|
//show all extensions
|
||||||
$sql = "select count(*) as num_rows from v_conference_centers ";
|
$sql = "select count(*) as num_rows from v_conference_centers ";
|
||||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||||
@@ -103,7 +103,7 @@ else {
|
|||||||
$offset = $rows_per_page * $page;
|
$offset = $rows_per_page * $page;
|
||||||
|
|
||||||
//get the list
|
//get the list
|
||||||
if (if_group("superadmin") || if_group("admin")) {
|
if (permission_exists('conference_center_add') || permission_exists('conference_center_edit')) {
|
||||||
//show all extensions
|
//show all extensions
|
||||||
$sql = "select * from v_conference_centers ";
|
$sql = "select * from v_conference_centers ";
|
||||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||||
|
|||||||
Reference in New Issue
Block a user