Merge branch '3.6-rc'
[friendica-addons.git] / dav / friendica / dav_caldav_backend_virtual_friendica.inc.php
index b02b9150a6a754e8856d9d6a67d5169648acbb5d..c108d8dcfec73bc7952c087be55a917d3805c228 100644 (file)
@@ -127,7 +127,7 @@ class Sabre_CalDAV_Backend_Friendica extends Sabre_CalDAV_Backend_Virtual
 
                $summary = (($row["summary"]) ? $row["summary"] : substr(preg_replace("/\[[^\]]*\]/", "", $row["desc"]), 0, 100));
 
-               return [
+               return array(
                        "jq_id"             => $row["id"],
                        "ev_id"             => $row["id"],
                        "summary"           => escape_tags($summary),
@@ -145,7 +145,7 @@ class Sabre_CalDAV_Backend_Friendica extends Sabre_CalDAV_Backend_Virtual
                        "url_detail"        => $base_path . "/events/event/" . $row["id"],
                        "url_edit"          => "",
                        "special_type"      => ($row["type"] == "birthday" ? "birthday" : ""),
-               ];
+               );
        }
 
 
@@ -182,7 +182,7 @@ class Sabre_CalDAV_Backend_Friendica extends Sabre_CalDAV_Backend_Virtual
                        if (is_numeric($date_to)) $sql_where .= " AND `start` <= '" . date(DateTimeFormat::MYSQL, $date_to) . "'";
                        else $sql_where .= " AND `start` <= '" . dbesc($date_to) . "'";
                }
-               $ret = [];
+               $ret = array();
 
                $r = q("SELECT * FROM `event` WHERE `uid` = %d " . $sql_where . " ORDER BY `start`", IntVal($calendar["namespace_id"]));
 
@@ -217,21 +217,21 @@ class Sabre_CalDAV_Backend_Friendica extends Sabre_CalDAV_Backend_Virtual
        public function getCalendarsForUser($principalUri)
        {
                $n = dav_compat_principal2namespace($principalUri);
-               if ($n["namespace"] != $this->getNamespace()) return [];
+               if ($n["namespace"] != $this->getNamespace()) return array();
 
                $cals = q("SELECT * FROM %s%scalendars WHERE `namespace` = %d AND `namespace_id` = %d", CALDAV_SQL_DB, CALDAV_SQL_PREFIX, $this->getNamespace(), IntVal($n["namespace_id"]));
-               $ret  = [];
+               $ret  = array();
                foreach ($cals as $cal) {
                        if (!in_array($cal["uri"], $GLOBALS["CALDAV_PRIVATE_SYSTEM_CALENDARS"])) continue;
 
-                       $dat = [
+                       $dat = array(
                                "id"                                                      => $cal["id"],
                                "uri"                                                     => $cal["uri"],
                                "principaluri"                                            => $principalUri,
                                '{' . Sabre_CalDAV_Plugin::NS_CALENDARSERVER . '}getctag' => $cal['ctag'] ? $cal['ctag'] : '0',
-                               '{' . Sabre_CalDAV_Plugin::NS_CALDAV . '}supported-calendar-component-set' => new Sabre_CalDAV_Property_SupportedCalendarComponentSet(["VEVENT"]),
+                               '{' . Sabre_CalDAV_Plugin::NS_CALDAV . '}supported-calendar-component-set' => new Sabre_CalDAV_Property_SupportedCalendarComponentSet(array("VEVENT")),
                                "calendar_class"                                          => "Sabre_CalDAV_Calendar_Virtual",
-                       ];
+                       );
                        foreach ($this->propertyMap as $key=> $field) $dat[$key] = $cal[$field];
 
                        $ret[] = $dat;