]> git.mxchange.org Git - friendica-addons.git/blobdiff - dav/common/wdcal_backend.inc.php
Update t() calls
[friendica-addons.git] / dav / common / wdcal_backend.inc.php
index 9233da6e21f8bb4124cd4e288b5e88eecd9515ae..a3e18eb394eedfe8ab9110f4efff91410430d646 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 
-
-
+use Friendica\Core\L10n;
 
 /**
  * @param mixed $obj
@@ -89,7 +88,7 @@ function wdcal_print_feed($base_path = "")
                        $cs = wdcal_print_feed_getCal($server, DAV_ACL_WRITE);
                        if ($cs == null) {
                                echo wdcal_jsonp_encode(array('IsSuccess' => false,
-                                                                                         'Msg'       => t('No access')));
+                                                                                         'Msg'       => L10n::t('No access')));
                                killme();
                        }
                        try {
@@ -97,12 +96,12 @@ function wdcal_print_feed($base_path = "")
                                $component = dav_get_eventComponent($item);
                                $component->add("SUMMARY", icalendar_sanitize_string(dav_compat_parse_text_serverside("CalendarTitle")));
 
-                               if (isset($_REQUEST["allday"])) $type = Sabre_VObject_Property_DateTime::DATE;
-                               else $type = Sabre_VObject_Property_DateTime::LOCALTZ;
+                               if (isset($_REQUEST["allday"])) $type = Sabre\VObject\Property\DateTime::DATE;
+                               else $type = Sabre\VObject\Property\DateTime::LOCALTZ;
 
-                               $datetime_start = new Sabre_VObject_Property_DateTime("DTSTART");
+                               $datetime_start = new Sabre\VObject\Property\DateTime("DTSTART");
                                $datetime_start->setDateTime(new DateTime(date("Y-m-d H:i:s", IntVal($_REQUEST["CalendarStartTime"]))), $type);
-                               $datetime_end = new Sabre_VObject_Property_DateTime("DTEND");
+                               $datetime_end = new Sabre\VObject\Property\DateTime("DTEND");
                                $datetime_end->setDateTime(new DateTime(date("Y-m-d H:i:s", IntVal($_REQUEST["CalendarEndTime"]))), $type);
 
                                $component->add($datetime_start);
@@ -163,7 +162,7 @@ function wdcal_print_feed($base_path = "")
                        $r = q("SELECT `calendarobject_id`, `calendar_id` FROM %s%sjqcalendar WHERE `id`=%d", CALDAV_SQL_DB, CALDAV_SQL_PREFIX, IntVal($_REQUEST["jq_id"]));
                        if (count($r) != 1) {
                                echo wdcal_jsonp_encode(array('IsSuccess' => false,
-                                                                                         'Msg'       => t('No access')));
+                                                                                         'Msg'       => L10n::t('No access')));
                                killme();
                        }
                        try {
@@ -175,16 +174,16 @@ function wdcal_print_feed($base_path = "")
 
                                if (!$component) {
                                        echo wdcal_jsonp_encode(array('IsSuccess' => false,
-                                                                                                 'Msg'       => t('No access')));
+                                                                                                 'Msg'       => L10n::t('No access')));
                                        killme();
                                }
 
-                               if (isset($_REQUEST["allday"])) $type = Sabre_VObject_Property_DateTime::DATE;
-                               else $type = Sabre_VObject_Property_DateTime::LOCALTZ;
+                               if (isset($_REQUEST["allday"])) $type = Sabre\VObject\Property\DateTime::DATE;
+                               else $type = Sabre\VObject\Property\DateTime::LOCALTZ;
 
-                               $datetime_start = new Sabre_VObject_Property_DateTime("DTSTART");
+                               $datetime_start = new Sabre\VObject\Property\DateTime("DTSTART");
                                $datetime_start->setDateTime(new DateTime(date("Y-m-d H:i:s", IntVal($_REQUEST["CalendarStartTime"]))), $type);
-                               $datetime_end = new Sabre_VObject_Property_DateTime("DTEND");
+                               $datetime_end = new Sabre\VObject\Property\DateTime("DTEND");
                                $datetime_end->setDateTime(new DateTime(date("Y-m-d H:i:s", IntVal($_REQUEST["CalendarEndTime"]))), $type);
 
                                $component->__unset("DTSTART");
@@ -203,7 +202,7 @@ function wdcal_print_feed($base_path = "")
                                );
                        } catch (Exception $e) {
                                echo wdcal_jsonp_encode(array('IsSuccess' => false,
-                                                                                         'Msg'       => t('No access')));
+                                                                                         'Msg'       => L10n::t('No access')));
                                killme();
                        }
                        break;
@@ -211,7 +210,7 @@ function wdcal_print_feed($base_path = "")
                        $r = q("SELECT `calendarobject_id`, `calendar_id` FROM %s%sjqcalendar WHERE `id`=%d", CALDAV_SQL_DB, CALDAV_SQL_PREFIX, IntVal($_REQUEST["jq_id"]));
                        if (count($r) != 1) {
                                echo wdcal_jsonp_encode(array('IsSuccess' => false,
-                                                                                         'Msg'       => t('No access')));
+                                                                                         'Msg'       => L10n::t('No access')));
                                killme();
                        }
                        try {
@@ -226,7 +225,7 @@ function wdcal_print_feed($base_path = "")
                                );
                        } catch (Exception $e) {
                                echo wdcal_jsonp_encode(array('IsSuccess' => false,
-                                                                                         'Msg'       => t('No access')));
+                                                                                         'Msg'       => L10n::t('No access')));
                                killme();
                        }