mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
fixed error with update event comments
This commit is contained in:
parent
cfe30d5b7d
commit
9ddfde1774
@ -184,6 +184,11 @@ if ($update_special_day) {
|
|||||||
$id_group = (string) get_parameter('id_group');
|
$id_group = (string) get_parameter('id_group');
|
||||||
$id_group_orig = (string) get_parameter('id_group_orig');
|
$id_group_orig = (string) get_parameter('id_group_orig');
|
||||||
|
|
||||||
|
$aviable_description = true;
|
||||||
|
if (preg_match('<script>', $description)) {
|
||||||
|
$aviable_description = false;
|
||||||
|
}
|
||||||
|
|
||||||
$array_date = explode('-', $date);
|
$array_date = explode('-', $date);
|
||||||
|
|
||||||
$year = $array_date[0];
|
$year = $array_date[0];
|
||||||
@ -214,14 +219,18 @@ if ($update_special_day) {
|
|||||||
$result = '';
|
$result = '';
|
||||||
$messageAction = __('Could not be updated, it already exists');
|
$messageAction = __('Could not be updated, it already exists');
|
||||||
} else {
|
} else {
|
||||||
|
if ($aviable_description !== false) {
|
||||||
$result = alerts_update_alert_special_day($id, $values);
|
$result = alerts_update_alert_special_day($id, $values);
|
||||||
$info = '{"Date":"'.$date.'","Same day of the week":"'.$same_day.'","Description":"'.$description.'"}';
|
$info = '{"Date":"'.$date.'","Same day of the week":"'.$same_day.'","Description":"'.$description.'"}';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if ($aviable_description !== false) {
|
||||||
$result = alerts_update_alert_special_day($id, $values);
|
$result = alerts_update_alert_special_day($id, $values);
|
||||||
$info = '{"Date":"'.$date.'","Same day of the week":"'.$same_day.'","Description":"'.$description.'"}';
|
$info = '{"Date":"'.$date.'","Same day of the week":"'.$same_day.'","Description":"'.$description.'"}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
db_pandora_audit('Command management', 'Update special day '.$id, false, false, $info);
|
db_pandora_audit('Command management', 'Update special day '.$id, false, false, $info);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user