Phrases: Updates for PHP 8.1

This commit is contained in:
fusionate
2023-06-08 19:51:18 +00:00
parent 4ac06a9194
commit 6b07e8d168
3 changed files with 38 additions and 32 deletions
+5 -5
View File
@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2018-2020
Portions created by the Initial Developer are Copyright (C) 2018-2023
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -196,7 +196,7 @@
echo "<tr class='list-header'>\n";
if (permission_exists('phrase_add') || permission_exists('phrase_edit') || permission_exists('phrase_delete')) {
echo " <th class='checkbox'>\n";
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".($phrases ?: "style='visibility: hidden;'").">\n";
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".(empty($phrases) ? "style='visibility: hidden;'" : null).">\n";
echo " </th>\n";
}
if ($show == "all" && permission_exists('phrase_all')) {
@@ -224,7 +224,7 @@
echo " <input type='hidden' name='phrases[$x][uuid]' value='".escape($row['phrase_uuid'])."' />\n";
echo " </td>\n";
}
if ($_GET['show'] == "all" && permission_exists('phrase_all')) {
if (!empty($_GET['show']) && $_GET['show'] == "all" && permission_exists('phrase_all')) {
if (!empty($_SESSION['domains'][$row['domain_uuid']]['domain_name'])) {
$domain = $_SESSION['domains'][$row['domain_uuid']]['domain_name'];
}
@@ -252,7 +252,7 @@
}
echo " </td>\n";
echo " <td class='description overflow hide-sm-dn'>".escape($row['phrase_description'])."&nbsp;</td>\n";
if (permission_exists('phrase_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('phrase_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
echo " <td class='action-button'>";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";
@@ -274,4 +274,4 @@
//include the footer
require_once "resources/footer.php";
?>
?>