]> git.mxchange.org Git - friendica.git/commitdiff
UUID is now createUUID
authorMichael <heluecht@pirati.ca>
Thu, 27 Sep 2018 11:52:15 +0000 (11:52 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 27 Sep 2018 11:52:15 +0000 (11:52 +0000)
12 files changed:
include/api.php
mod/item.php
mod/photos.php
mod/poke.php
mod/subthread.php
mod/tagger.php
src/Core/System.php
src/Model/Event.php
src/Model/Item.php
src/Model/Mail.php
src/Model/User.php
src/Protocol/Diaspora.php

index 52f8e7ad8e24579887dde342843d9a155fd3ad2e..cfc0c30564c45b4d6cfa70ad5dc594614a46ddd7 100644 (file)
@@ -4534,7 +4534,7 @@ function post_photo_item($hash, $allow_cid, $deny_cid, $allow_gid, $deny_gid, $f
        $owner_record = DBA::selectFirst('contact', [], ['uid' => api_user(), 'self' => true]);
 
        $arr = [];
-       $arr['guid']          = System::UUID();
+       $arr['guid']          = System::createUUID();
        $arr['uid']           = intval(api_user());
        $arr['uri']           = $uri;
        $arr['parent-uri']    = $uri;
index c8207984a92a35a5b2f865e4049f202e21dd139a..20c0aaf747e25edfa7dfdc0bf955aca1c9039240 100644 (file)
@@ -240,7 +240,7 @@ function item_post(App $a) {
                $emailcc           =      notags(trim(defaults($_REQUEST, 'emailcc' , '')));
                $body              = escape_tags(trim(defaults($_REQUEST, 'body'    , '')));
                $network           =      notags(trim(defaults($_REQUEST, 'network' , Protocol::DFRN)));
-               $guid              =      System::UUID();
+               $guid              =      System::createUUID();
 
                $postopts = defaults($_REQUEST, 'postopts', '');
 
index 9794e9e7c016dc3804d4f8ba343ba04e8fef6dca..568d6eb5371a7ffeaf73d44d7e43bbc5a1d4bc55 100644 (file)
@@ -472,7 +472,7 @@ function photos_post(App $a)
                        $uri = Item::newURI($page_owner_uid);
 
                        $arr = [];
-                       $arr['guid']          = System::UUID();
+                       $arr['guid']          = System::createUUID();
                        $arr['uid']           = $page_owner_uid;
                        $arr['uri']           = $uri;
                        $arr['parent-uri']    = $uri;
@@ -651,7 +651,7 @@ function photos_post(App $a)
                                        $uri = Item::newURI($page_owner_uid);
 
                                        $arr = [];
-                                       $arr['guid']          = System::UUID();
+                                       $arr['guid']          = System::createUUID();
                                        $arr['uid']           = $page_owner_uid;
                                        $arr['uri']           = $uri;
                                        $arr['parent-uri']    = $uri;
@@ -889,7 +889,7 @@ function photos_post(App $a)
                $arr['coord'] = $lat . ' ' . $lon;
        }
 
-       $arr['guid']          = System::UUID();
+       $arr['guid']          = System::createUUID();
        $arr['uid']           = $page_owner_uid;
        $arr['uri']           = $uri;
        $arr['parent-uri']    = $uri;
index 46c9d2f4a95c71e4edf5e62108161aa8e0d82d49..6ebb8632c18b3a24bc229b2c300fc1a8e346e97f 100644 (file)
@@ -97,7 +97,7 @@ function poke_init(App $a)
 
        $arr = [];
 
-       $arr['guid']          = System::UUID();
+       $arr['guid']          = System::createUUID();
        $arr['uid']           = $uid;
        $arr['uri']           = $uri;
        $arr['parent-uri']    = (!empty($parent_uri) ? $parent_uri : $uri);
index 901bb0129b2809cc0bd429e72ef5defffedcbda3..105cf60feb7f1e3d3a3ba458c3b37625a149f29c 100644 (file)
@@ -108,7 +108,7 @@ EOT;
 
        $arr = [];
 
-       $arr['guid'] = System::UUID();
+       $arr['guid'] = System::createUUID();
        $arr['uri'] = $uri;
        $arr['uid'] = $owner_uid;
        $arr['contact-id'] = $contact['id'];
index 889ccd16f55c9cfb4efe4074d90165a201b14e3b..fd79d54150df6d60defe34a7b88f7616d278ad86 100644 (file)
@@ -115,7 +115,7 @@ EOT;
 
        $arr = [];
 
-       $arr['guid'] = System::UUID();
+       $arr['guid'] = System::createUUID();
        $arr['uri'] = $uri;
        $arr['uid'] = $owner_uid;
        $arr['contact-id'] = $contact['id'];
index 4eb6be0809d9771d9907160e8a6f471c9d1bbef0..b41f520d7792c614414cda5701ab8e8ab3ee22ed 100644 (file)
@@ -167,7 +167,7 @@ class System extends BaseObject
         * @param bool|string  $prefix   A given prefix (default is empty)
         * @return string a generated UUID
         */
-       public static function UUID($prefix = '')
+       public static function createUUID($prefix = '')
        {
                $guid = System::createGUID(32, $prefix);
                return substr($guid, 0, 8). '-' . substr($guid, 8, 4) . '-' . substr($guid, 12, 4) . '-' . substr($guid, 16, 4) . '-' . substr($guid, 20, 12);
index f08e1298945b36fbea9562a7d9272b6c84827517..452017e69d3a04bcfbd2269d851b1db69340f9ee 100644 (file)
@@ -314,7 +314,7 @@ class Event extends BaseObject
 
                        Addon::callHooks('event_updated', $event['id']);
                } else {
-                       $event['guid']  = defaults($arr, 'guid', System::UUID());
+                       $event['guid']  = defaults($arr, 'guid', System::createUUID());
 
                        // New event. Store it.
                        DBA::insert('event', $event);
index d8e814b8e6e8f68f560518dad798289b95dfbac5..619f5dc34927a28aad7447bdb6a6c06b9e778228 100644 (file)
@@ -1205,7 +1205,7 @@ class Item extends BaseObject
                } elseif (!empty($item['uri'])) {
                        $guid = self::guidFromUri($item['uri'], $prefix_host);
                } else {
-                       $guid = System::UUID(hash('crc32', $prefix_host));
+                       $guid = System::createUUID(hash('crc32', $prefix_host));
                }
 
                return $guid;
@@ -2359,7 +2359,7 @@ class Item extends BaseObject
        public static function newURI($uid, $guid = "")
        {
                if ($guid == "") {
-                       $guid = System::UUID();
+                       $guid = System::createUUID();
                }
 
                return self::getApp()->get_baseurl() . '/object/' . $guid;
@@ -2686,7 +2686,7 @@ class Item extends BaseObject
                        }
 
                        if ($contact['network'] != Protocol::FEED) {
-                               $datarray["guid"] = System::UUID();
+                               $datarray["guid"] = System::createUUID();
                                unset($datarray["plink"]);
                                $datarray["uri"] = self::newURI($contact['uid'], $datarray["guid"]);
                                $datarray["parent-uri"] = $datarray["uri"];
@@ -3115,7 +3115,7 @@ class Item extends BaseObject
                $objtype = $item['resource-id'] ? ACTIVITY_OBJ_IMAGE : ACTIVITY_OBJ_NOTE ;
 
                $new_item = [
-                       'guid'          => System::UUID(),
+                       'guid'          => System::createUUID(),
                        'uri'           => self::newURI($item['uid']),
                        'uid'           => $item['uid'],
                        'contact-id'    => $item_contact_id,
index 64a99d4def337a1e7b91d40ad5f422fb386959d4..49247ca69dfb1385eabd53cae08fd9144c4baab6 100644 (file)
@@ -46,7 +46,7 @@ class Mail
                        return -2;
                }
 
-               $guid = System::UUID();
+               $guid = System::createUUID();
                $uri = 'urn:X-dfrn:' . System::baseUrl() . ':' . local_user() . ':' . $guid;
 
                $convid = 0;
@@ -73,7 +73,7 @@ class Mail
                        $recip_handle = (($contact['addr']) ? $contact['addr'] : $contact['nick'] . '@' . $recip_host);
                        $sender_handle = $a->user['nickname'] . '@' . substr(System::baseUrl(), strpos(System::baseUrl(), '://') + 3);
 
-                       $conv_guid = System::UUID();
+                       $conv_guid = System::createUUID();
                        $convuri = $recip_handle . ':' . $conv_guid;
 
                        $handles = $recip_handle . ';' . $sender_handle;
@@ -171,7 +171,7 @@ class Mail
                        $subject = L10n::t('[no subject]');
                }
 
-               $guid = System::UUID();
+               $guid = System::createUUID();
                $uri = 'urn:X-dfrn:' . System::baseUrl() . ':' . local_user() . ':' . $guid;
 
                $me = Probe::uri($replyto);
@@ -180,7 +180,7 @@ class Mail
                        return -2;
                }
 
-               $conv_guid = System::UUID();
+               $conv_guid = System::createUUID();
 
                $recip_handle = $recipient['nickname'] . '@' . substr(System::baseUrl(), strpos(System::baseUrl(), '://') + 3);
 
index 366490bfc8850f88e687bd34544ed7d7afb96645..095bf56e725cd69fb6bfa7888bfcb5d3bd16b0ba 100644 (file)
@@ -495,7 +495,7 @@ class User
                $spubkey = $sres['pubkey'];
 
                $insert_result = DBA::insert('user', [
-                       'guid'     => System::UUID(),
+                       'guid'     => System::createUUID(),
                        'username' => $username,
                        'password' => $new_password_encoded,
                        'email'    => $email,
index 5239255fee83eb2c2f46f1a33d0f52150aeccc77..847809a36b716d96a17314f67a45f5bc3e03eef3 100644 (file)
@@ -3200,7 +3200,7 @@ class Diaspora
                $author = self::myHandle($owner);
 
                $message = ["author" => $author,
-                               "guid" => System::UUID(),
+                               "guid" => System::createUUID(),
                                "parent_type" => "Post",
                                "parent_guid" => $item["guid"]];