php 8.1 changes (#6719)
* Update email_template_edit.php * Update menu.php * Update menu_edit.php * Update number_translations.php * Update number_translations.php * Update email_templates.php * Update email_templates.php * Update setting_edit.php * Update call_block.php * Update call_block_edit.php * Update email_template_edit.php * Update call_block.php
This commit is contained in:
@@ -65,7 +65,7 @@
|
||||
}
|
||||
|
||||
//process the user data and save it to the database
|
||||
if (count($_POST) > 0 && empty($_POST["persistformvar"])) {
|
||||
if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
||||
|
||||
//get the uuid from the POST
|
||||
if ($action == "update") {
|
||||
@@ -145,7 +145,7 @@
|
||||
}
|
||||
|
||||
//pre-populate the form
|
||||
if (is_array($_GET) && $_POST["persistformvar"] != "true") {
|
||||
if (count($_GET)>0 && empty($_POST["persistformvar"])) {
|
||||
$email_template_uuid = $_GET["id"];
|
||||
$sql = "select * from v_email_templates ";
|
||||
$sql .= "where email_template_uuid = :email_template_uuid ";
|
||||
@@ -154,7 +154,7 @@
|
||||
//$parameters['domain_uuid'] = $domain_uuid;
|
||||
$database = new database;
|
||||
$row = $database->select($sql, $parameters, 'row');
|
||||
if (is_array($row) && @sizeof($row) != 0) {
|
||||
if (!empty($row)) {
|
||||
$domain_uuid = $row["domain_uuid"];
|
||||
$template_language = $row["template_language"];
|
||||
$template_category = $row["template_category"];
|
||||
@@ -172,11 +172,11 @@
|
||||
if (empty($template_enabled)) { $template_enabled = 'true'; }
|
||||
|
||||
//load editor preferences/defaults
|
||||
$setting_size = $_SESSION["editor"]["font_size"]["text"] != '' ? $_SESSION["editor"]["font_size"]["text"] : '12px';
|
||||
$setting_theme = $_SESSION["editor"]["theme"]["text"] != '' ? $_SESSION["editor"]["theme"]["text"] : 'cobalt';
|
||||
$setting_invisibles = $_SESSION["editor"]["invisibles"]["boolean"] != '' ? $_SESSION["editor"]["invisibles"]["boolean"] : 'false';
|
||||
$setting_indenting = $_SESSION["editor"]["indent_guides"]["boolean"] != '' ? $_SESSION["editor"]["indent_guides"]["boolean"] : 'false';
|
||||
$setting_numbering = $_SESSION["editor"]["line_numbers"]["boolean"] != '' ? $_SESSION["editor"]["line_numbers"]["boolean"] : 'true';
|
||||
$setting_size = !empty($_SESSION["editor"]["font_size"]["text"]) ? $_SESSION["editor"]["font_size"]["text"] : '12px';
|
||||
$setting_theme = !empty($_SESSION["editor"]["theme"]["text"]) ? $_SESSION["editor"]["theme"]["text"] : 'cobalt';
|
||||
$setting_invisibles = !empty($_SESSION["editor"]["invisibles"]["boolean"]) ? $_SESSION["editor"]["invisibles"]["boolean"] : 'false';
|
||||
$setting_indenting = !empty($_SESSION["editor"]["indent_guides"]["boolean"]) ? $_SESSION["editor"]["indent_guides"]["boolean"] : 'false';
|
||||
$setting_numbering = !empty($_SESSION["editor"]["line_numbers"]["boolean"]) ? $_SESSION["editor"]["line_numbers"]["boolean"] : 'true';
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
@@ -410,7 +410,7 @@
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-domain_uuid']."\n";
|
||||
echo !empty($text['description-domain_uuid'])."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
break;
|
||||
}
|
||||
|
||||
header('Location: email_templates.php?'.(!empty($search) ? '&search='.urlencode($search) : null).($category != '' ? '&category='.urlencode($category) : null));
|
||||
header('Location: email_templates.php?'.(!empty($search) ? '&search='.urlencode($search) : null).(!empty($category) ? '&category='.urlencode($category) : null));
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
}
|
||||
$sql .= $sql_category ?? '';
|
||||
$database = new database;
|
||||
$num_rows = $database->select($sql, $parameters, 'column');
|
||||
$num_rows = $database->select($sql, $parameters ?? '', 'column');
|
||||
|
||||
//prepare to page the results
|
||||
$rows_per_page = (!empty($_SESSION['domain']['paging']['numeric'])) ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
@@ -200,7 +200,7 @@
|
||||
echo "<select name='category' id='category' class='formfld' style='margin-left: 18px;' onchange=\"$('#form_search').submit();\">\n";
|
||||
echo "<option value='' ".(!$category ? "selected='selected'" : null)." disabled='disabled'>".$text['label-category']."...</option>\n";
|
||||
echo "<option value=''></option>\n";
|
||||
if (is_array($template_categories) && @sizeof($template_categories) != 0) {
|
||||
if (!empty($template_categories)) {
|
||||
foreach ($template_categories as $template_category_value => $template_category_label) {
|
||||
echo "<option value='".$template_category_value."' ".($category == $template_category_value ? "selected='selected'" : null).">".escape($template_category_label)."</option>\n";
|
||||
}
|
||||
@@ -209,7 +209,7 @@
|
||||
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown=''>";
|
||||
echo button::create(['label'=>$text['button-search'],'icon'=>$_SESSION['theme']['button_icon_search'],'type'=>'submit','id'=>'btn_search']);
|
||||
//echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_reset','link'=>'email_templates.php','style'=>($search == '' ? 'display: none;' : null)]);
|
||||
if ($paging_controls_mini != '') {
|
||||
if (!empty($paging_controls_mini)) {
|
||||
echo "<span style='margin-left: 15px;'>".$paging_controls_mini."</span>";
|
||||
}
|
||||
echo " </form>\n";
|
||||
@@ -257,7 +257,7 @@
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
||||
if (is_array($result) && @sizeof($result) != 0) {
|
||||
if (!empty($result)) {
|
||||
$x = 0;
|
||||
foreach($result as $row) {
|
||||
if (permission_exists('email_template_edit')) {
|
||||
|
||||
Reference in New Issue
Block a user