From ac03d83e604cf42cec8895fcbbacf08fa14fd3b8 Mon Sep 17 00:00:00 2001 From: Hani Rouatbi Date: Wed, 16 Nov 2022 21:39:04 +0100 Subject: [PATCH] Fixes for messages and reports --- go.php | 8 ++++---- includes/adm/e_calls.php | 3 +-- includes/adm/f_reports.php | 1 - 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/go.php b/go.php index 0594e41..df0856f 100755 --- a/go.php +++ b/go.php @@ -178,7 +178,7 @@ switch ($current_go_case) if (empty($ERRORS)) { $name = $NOT_USER ? (string) $SQL->escape(p('rname')) : $usrcp->name(); - $text = (string) $SQL->escape(p('rtext')); + $text = (string) $SQL->escape(htmlspecialchars_decode(p('rtext'))); $mail = $NOT_USER ? (string) strtolower(trim($SQL->escape(p('rmail')))) : $usrcp->mail(); $url = (string) ip('rid') ? $SQL->escape($url_id) : $SQL->real_escape(p('surl')); $time = (int) time(); @@ -307,7 +307,7 @@ switch ($current_go_case) if (empty($ERRORS)) { $name = $NOT_USER ? (string) $SQL->escape(p('cname')) : $usrcp->name(); - $text = (string) $SQL->escape(p('ctext')); + $text = (string) $SQL->escape(htmlspecialchars_decode(p('ctext'))); $mail = $NOT_USER ? (string) strtolower(trim($SQL->escape(p('cmail')))) : $usrcp->mail(); $timee = (int) time(); $ip = get_ip(); @@ -519,11 +519,11 @@ switch ($current_go_case) //do some of the queue .. if (preg_match('/:del_[a-z0-9]{0,3}calls:/i', $config['queue'])) { - klj_clean_old('call', (strpos(':del_allcalls:', $config['queue']) !== false ? 'all': 30)); + klj_clean_old('call', (strpos($config['queue'], ':del_allcalls:') !== false ? 'all': 30)); } elseif (preg_match('/:del_[a-z0-9]{0,3}reports:/i', $config['queue'])) { - klj_clean_old('reports', (strpos(':del_allreports:', $config['queue']) !== false ? 'all': 30)); + klj_clean_old('reports', (strpos($config['queue'], ':del_allreports:') !== false ? 'all': 30)); } elseif ((int) $config['del_f_day'] > 0) { diff --git a/includes/adm/e_calls.php b/includes/adm/e_calls.php index 005ac21..0755bde 100755 --- a/includes/adm/e_calls.php +++ b/includes/adm/e_calls.php @@ -85,7 +85,7 @@ if ($nums_rows > 0) 'id' => $row['id'], 'name' => $row['name'], 'mail' => $row['mail'], - 'text' => htmlspecialchars($row['text']), + 'text' => $row['text'], 'human_time' => kleeja_date($row['time']), 'time' => kleeja_date($row['time'], false), 'ip' => $row['ip'], @@ -156,7 +156,6 @@ $page_nums = $Pager->print_nums(basename(ADMIN_PATH) . '?cp=' . basename if (ip('submit')) { $text = ($SQL->affected() ? $lang['CALLS_UPDATED'] : $lang['NO_UP_CHANGE_S']); - $text .= '' . "\n"; kleeja_admin_info($text, true, '', true, $action); } diff --git a/includes/adm/f_reports.php b/includes/adm/f_reports.php index 8324839..3baac77 100755 --- a/includes/adm/f_reports.php +++ b/includes/adm/f_reports.php @@ -155,7 +155,6 @@ $page_nums = $Pager->print_nums(basename(ADMIN_PATH) . '?cp=' . basenam if (ip('submit')) { $text = ($SQL->affected() ? $lang['REPORTS_UPDATED'] : $lang['NO_UP_CHANGE_S']); - $text .= '' . "\n"; kleeja_admin_info($text, true, '', true, $action); }