<?php
+use Friendica\Util\Emailer;
require_once('include/security.php');
if ($a->argv[2] == "new") {
$o = "";
if (isset($_REQUEST["save"])) {
- check_form_security_token_redirectOnErr($a->get_baseurl() . "/dav/wdcal/", "caledit");
+ check_form_security_token_redirectOnErr("/dav/wdcal/", "caledit");
$ret = wdcal_postEditPage("new", "", $a->user["uid"], $a->timezone, $a->get_baseurl() . "/dav/wdcal/");
if ($ret["ok"]) notice($ret["msg"]);
else info($ret["msg"]);
if (isset($a->argv[4]) && $a->argv[4] == "edit") {
$o = "";
if (isset($_REQUEST["save"])) {
- check_form_security_token_redirectOnErr($a->get_baseurl() . "/dav/wdcal/", "caledit");
+ check_form_security_token_redirectOnErr("/dav/wdcal/", "caledit");
$ret = wdcal_postEditPage($a->argv[3], $a->user["uid"], $a->timezone, $a->get_baseurl() . "/dav/wdcal/");
if ($ret["ok"]) notice($ret["msg"]);
else info($ret["msg"]);
dav_include_files();
$r = q("SELECT * FROM %s%snotifications WHERE `notified` = 0 AND `alert_date` <= NOW()", CALDAV_SQL_DB, CALDAV_SQL_PREFIX);
+ if (is_array($r)) {
foreach ($r as $not) {
q("UPDATE %s%snotifications SET `notified` = 1 WHERE `id` = %d", CALDAV_SQL_DB, CALDAV_SQL_PREFIX, $not["id"]);
$event = q("SELECT * FROM %s%sjqcalendar WHERE `calendarobject_id` = %d", CALDAV_SQL_DB, CALDAV_SQL_PREFIX, $not["calendarobject_id"]);
'textVersion' => $text_text,
'additionalMailHeader' => "",
);
- require_once('include/enotify.php');
- enotify::send($params);
+ Emailer::send($params);
}
break;
}
}
+ }
}