]> git.mxchange.org Git - friendica.git/blobdiff - include/event.php
Add defuse/php-encryption 2.0 to Composer dependencies
[friendica.git] / include / event.php
index b9988badfa1aaddbc110b03bfc8c43770ad5c9b8..8d47b5fba56838d1f841359f3375739b79e7cd2b 100644 (file)
@@ -5,7 +5,9 @@
  */
 
 use Friendica\App;
+use Friendica\Core\PConfig;
 use Friendica\Core\System;
+use Friendica\Database\DBM;
 
 require_once 'include/bbcode.php';
 require_once 'include/map.php';
@@ -253,7 +255,7 @@ function event_store($arr) {
                );
        }
 
-       if (dbm::is_result($c)) {
+       if (DBM::is_result($c)) {
                $contact = $c[0];
        }
 
@@ -268,7 +270,7 @@ function event_store($arr) {
                        intval($arr['id']),
                        intval($arr['uid'])
                );
-               if ((! dbm::is_result($r)) || ($r[0]['edited'] === $arr['edited'])) {
+               if ((! DBM::is_result($r)) || ($r[0]['edited'] === $arr['edited'])) {
 
                        // Nothing has changed. Grab the item id to return.
 
@@ -276,7 +278,7 @@ function event_store($arr) {
                                intval($arr['id']),
                                intval($arr['uid'])
                        );
-                       return ((dbm::is_result($r)) ? $r[0]['id'] : 0);
+                       return ((DBM::is_result($r)) ? $r[0]['id'] : 0);
                }
 
                // The event changed. Update it.
@@ -309,7 +311,7 @@ function event_store($arr) {
                        intval($arr['id']),
                        intval($arr['uid'])
                );
-               if (dbm::is_result($r)) {
+               if (DBM::is_result($r)) {
                        $object = '<object><type>' . xmlify(ACTIVITY_OBJ_EVENT) . '</type><title></title><id>' . xmlify($arr['uri']) . '</id>';
                        $object .= '<content>' . xmlify(format_event_bbcode($arr)) . '</content>';
                        $object .= '</object>' . "\n";
@@ -360,7 +362,7 @@ function event_store($arr) {
                        dbesc($arr['uri']),
                        intval($arr['uid'])
                );
-               if (dbm::is_result($r)) {
+               if (DBM::is_result($r)) {
                        $event = $r[0];
                }
 
@@ -403,7 +405,7 @@ function event_store($arr) {
                $r = q("SELECT * FROM `user` WHERE `uid` = %d LIMIT 1",
                        intval($arr['uid'])
                );
-               //if (dbm::is_result($r))
+               //if (DBM::is_result($r))
                //      $plink = System::baseUrl() . '/display/' . $r[0]['nickname'] . '/' . $item_id;
 
 
@@ -435,7 +437,7 @@ function event_store($arr) {
 function get_event_strings() {
 
        // First day of the week (0 = Sunday).
-       $firstDay = get_pconfig(local_user(), 'system', 'first_day_of_week');
+       $firstDay = PConfig::get(local_user(), 'system', 'first_day_of_week');
        if ($firstDay === false) {
                $firstDay = 0;
        }
@@ -546,7 +548,7 @@ function event_by_id($owner_uid = 0, $event_params, $sql_extra = '') {
                intval($event_params["event_id"])
        );
 
-       if (dbm::is_result($r)) {
+       if (DBM::is_result($r)) {
                return event_remove_duplicates($r);
        }
 }
@@ -590,7 +592,7 @@ function events_by_date($owner_uid = 0, $event_params, $sql_extra = '') {
                        dbesc($event_params["adjust_finish"])
        );
 
-       if (dbm::is_result($r)) {
+       if (DBM::is_result($r)) {
                return event_remove_duplicates($r);
        }
 }
@@ -804,7 +806,7 @@ function events_by_uid($uid = 0, $sql_extra = '') {
                );
        }
 
-       if (dbm::is_result($r)) {
+       if (DBM::is_result($r)) {
                return $r;
        }
 }
@@ -828,7 +830,7 @@ function event_export($uid, $format = 'ical') {
        // We are allowed to show events.
        // Get the timezone the user is in.
        $r = q("SELECT `timezone` FROM `user` WHERE `uid` = %d LIMIT 1", intval($uid));
-       if (dbm::is_result($r)) {
+       if (DBM::is_result($r)) {
                $timezone = $r[0]['timezone'];
        }