Upgrade LBCAlerte to version 3.3

Add upgrade script
This commit is contained in:
Jimmy Monin
2016-11-26 19:19:16 +01:00
parent a7c054b535
commit 58ffd500e6
89 changed files with 6436 additions and 758 deletions

View File

@ -1,12 +1,25 @@
<?php
if (isset($_GET["id"]) && $alert = $storage->fetchById($_GET["id"])) {
$status = isset($_GET["s"])?$_GET["s"]:"";
if (in_array($status, array("suspend", "send_mail", "send_sms_free_mobile",
"send_sms_ovh", "send_pushbullet", "send_notifymyandroid",
"send_pushover"))) {
$status = isset($_GET["s"]) ? $_GET["s"] : "";
$update = false;
if ($status == "suspend") {
$alert->$status = !$alert->$status;
$update = true;
} else {
foreach ($data_notifications AS $name => $notification) {
if ($status == $notification["form_name"]) {
$alert->$status = !$alert->$status;
$update = true;
break;
}
}
}
if ($update) {
$storage->save($alert);
}
}
header("LOCATION: ./?mod=mail"); exit;
header("LOCATION: ./?mod=mail");
exit;