mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Use the settings class get method
This commit is contained in:
@@ -92,7 +92,7 @@
|
||||
|
||||
//$contact_users = $_POST["contact_users"];
|
||||
//$contact_groups = $_POST["contact_groups"];
|
||||
$contact_user_uuid = filter_var($_SESSION['contact']['permissions']['boolean'] ?? false, FILTER_VALIDATE_BOOLEAN) ? ($_POST["contact_user_uuid"] ?? $_SESSION["user_uuid"]) : ($contact_user_uuid = $_POST["contact_user_uuid"] ?? null);
|
||||
$contact_user_uuid = $settings->get('contact', 'permissions', false) ? ($_POST["contact_user_uuid"] ?? $_SESSION["user_uuid"]) : ($contact_user_uuid = $_POST["contact_user_uuid"] ?? null);
|
||||
$contact_group_uuid = $_POST["contact_group_uuid"] ?? null;
|
||||
|
||||
$contact_phones = $_POST["contact_phones"];
|
||||
@@ -1529,7 +1529,7 @@ echo " </div>\n";
|
||||
echo " </div>\n";
|
||||
unset($contact_note);
|
||||
|
||||
if (filter_var($_SESSION['contact']['permissions']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
if ($settings->get('contact', 'permissions', false)) {
|
||||
if (permission_exists('contact_user_view') || permission_exists('contact_group_view')) {
|
||||
echo " <div class='form_set card'>\n";
|
||||
echo " <div class='heading'>\n";
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
echo "<th>".$text['label-phone_type']."</th>\n";
|
||||
echo "<th>".$text['label-phone_tools']."</th>\n";
|
||||
echo "<th class='hide-md-dn'>".$text['label-phone_description']."</th>\n";
|
||||
if (permission_exists('contact_phone_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
if (permission_exists('contact_phone_edit') && $settings->get('theme', 'list_row_edit_button', false)) {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
@@ -130,7 +130,7 @@
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " <td class='description overflow hide-md-dn'>".escape($row['phone_description'])." </td>\n";
|
||||
if (permission_exists('contact_phone_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
if (permission_exists('contact_phone_edit') && $settings->get('theme', 'list_row_edit_button', false)) {
|
||||
echo " <td class='action-button'>\n";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$settings->get('theme', 'button_icon_edit'),'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
echo "<th class='pct-15'>".$text['label-url_label']."</th>\n";
|
||||
echo "<th>".$text['label-url_address']."</th>\n";
|
||||
echo "<th class='hide-md-dn'>".$text['label-url_description']."</th>\n";
|
||||
if (permission_exists('contact_url_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
if (permission_exists('contact_url_edit') && $settings->get('theme', 'list_row_edit_button', false)) {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
@@ -98,7 +98,7 @@
|
||||
echo " <td>".escape($row['url_label'])." ".($row['url_primary'] ? " <i class='fas fa-star fa-xs' style='float: right; margin-top: 0.5em; margin-right: -0.5em;' title=\"".$text['label-primary']."\"></i>" : null)."</td>\n";
|
||||
echo " <td class='no-link overflow no-wrap'><a href='".escape($row['url_address'])."' target='_blank'>".str_replace("http://", "", str_replace("https://", "", escape($row['url_address'])))."</a></td>\n";
|
||||
echo " <td class='description overflow hide-md-dn'>".escape($row['url_description'])." </td>\n";
|
||||
if (permission_exists('contact_url_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
if (permission_exists('contact_url_edit') && $settings->get('theme', 'list_row_edit_button', false)) {
|
||||
echo " <td class='action-button'>\n";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$settings->get('theme', 'button_icon_edit'),'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
||||
Reference in New Issue
Block a user