forked from friendica/friendica-addons
Use short form array syntax everywhere
This commit is contained in:
parent
4ee41c64a3
commit
27b60e003f
68 changed files with 869 additions and 869 deletions
|
@ -198,7 +198,7 @@ function dav_content()
|
|||
} else {
|
||||
$server = dav_create_server(true, true, false);
|
||||
$cals = dav_get_current_user_calendars($server, DAV_ACL_READ);
|
||||
$x = wdcal_printCalendar($cals, array(), $a->get_baseurl() . "/dav/wdcal/feed/", "week", 0, 200);
|
||||
$x = wdcal_printCalendar($cals, [], $a->get_baseurl() . "/dav/wdcal/feed/", "week", 0, 200);
|
||||
}
|
||||
}
|
||||
} catch (DAVVersionMismatchException $e) {
|
||||
|
@ -238,12 +238,12 @@ function dav_event_updated_hook(&$a, &$b)
|
|||
*/
|
||||
function dav_profile_tabs_hook(&$a, &$b)
|
||||
{
|
||||
$b["tabs"][] = array(
|
||||
$b["tabs"][] = [
|
||||
"label" => t('Calendar'),
|
||||
"url" => $a->get_baseurl() . "/dav/wdcal/",
|
||||
"sel" => "",
|
||||
"title" => t('Extended calendar with CalDAV-support'),
|
||||
);
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
@ -261,7 +261,7 @@ function dav_cron(&$a, &$b)
|
|||
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"]);
|
||||
$calendar = q("SELECT * FROM %s%scalendars WHERE `id` = %d", CALDAV_SQL_DB, CALDAV_SQL_PREFIX, $not["calendar_id"]);
|
||||
$users = array();
|
||||
$users = [];
|
||||
if (count($calendar) != 1 || count($event) == 0) continue;
|
||||
switch ($calendar[0]["namespace"]) {
|
||||
case CALDAV_NAMESPACE_PRIVATE:
|
||||
|
@ -274,11 +274,11 @@ function dav_cron(&$a, &$b)
|
|||
case "email":
|
||||
case "display": // @TODO implement "Display"
|
||||
foreach ($users as $user) {
|
||||
$find = array("%to%", "%event%", "%url%");
|
||||
$repl = array($user["username"], $event[0]["Summary"], $a->get_baseurl() . "/dav/wdcal/" . $calendar[0]["id"] . "/" . $not["calendarobject_id"] . "/");
|
||||
$find = ["%to%", "%event%", "%url%"];
|
||||
$repl = [$user["username"], $event[0]["Summary"], $a->get_baseurl() . "/dav/wdcal/" . $calendar[0]["id"] . "/" . $not["calendarobject_id"] . "/"];
|
||||
$text_text = str_replace($find, $repl, "Hi %to%!\n\nThe event \"%event%\" is about to begin:\n%url%");
|
||||
$text_html = str_replace($find, $repl, "Hi %to%!<br>\n<br>\nThe event \"%event%\" is about to begin:<br>\n<a href='" . "%url%" . "'>%url%</a>");
|
||||
$params = array(
|
||||
$params = [
|
||||
'fromName' => FRIENDICA_PLATFORM,
|
||||
'fromEmail' => t('noreply') . '@' . $a->get_hostname(),
|
||||
'replyTo' => t('noreply') . '@' . $a->get_hostname(),
|
||||
|
@ -287,7 +287,7 @@ function dav_cron(&$a, &$b)
|
|||
'htmlVersion' => $text_html,
|
||||
'textVersion' => $text_text,
|
||||
'additionalMailHeader' => "",
|
||||
);
|
||||
];
|
||||
Emailer::send($params);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue