$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;
$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', '');
$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;
$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;
$arr['coord'] = $lat . ' ' . $lon;
}
- $arr['guid'] = System::UUID();
+ $arr['guid'] = System::createUUID();
$arr['uid'] = $page_owner_uid;
$arr['uri'] = $uri;
$arr['parent-uri'] = $uri;
$arr = [];
- $arr['guid'] = System::UUID();
+ $arr['guid'] = System::createUUID();
$arr['uid'] = $uid;
$arr['uri'] = $uri;
$arr['parent-uri'] = (!empty($parent_uri) ? $parent_uri : $uri);
$arr = [];
- $arr['guid'] = System::UUID();
+ $arr['guid'] = System::createUUID();
$arr['uri'] = $uri;
$arr['uid'] = $owner_uid;
$arr['contact-id'] = $contact['id'];
$arr = [];
- $arr['guid'] = System::UUID();
+ $arr['guid'] = System::createUUID();
$arr['uri'] = $uri;
$arr['uid'] = $owner_uid;
$arr['contact-id'] = $contact['id'];
* @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);
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);
} 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;
public static function newURI($uid, $guid = "")
{
if ($guid == "") {
- $guid = System::UUID();
+ $guid = System::createUUID();
}
return self::getApp()->get_baseurl() . '/object/' . $guid;
}
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"];
$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,
return -2;
}
- $guid = System::UUID();
+ $guid = System::createUUID();
$uri = 'urn:X-dfrn:' . System::baseUrl() . ':' . local_user() . ':' . $guid;
$convid = 0;
$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;
$subject = L10n::t('[no subject]');
}
- $guid = System::UUID();
+ $guid = System::createUUID();
$uri = 'urn:X-dfrn:' . System::baseUrl() . ':' . local_user() . ':' . $guid;
$me = Probe::uri($replyto);
return -2;
}
- $conv_guid = System::UUID();
+ $conv_guid = System::createUUID();
$recip_handle = $recipient['nickname'] . '@' . substr(System::baseUrl(), strpos(System::baseUrl(), '://') + 3);
$spubkey = $sres['pubkey'];
$insert_result = DBA::insert('user', [
- 'guid' => System::UUID(),
+ 'guid' => System::createUUID(),
'username' => $username,
'password' => $new_password_encoded,
'email' => $email,
$author = self::myHandle($owner);
$message = ["author" => $author,
- "guid" => System::UUID(),
+ "guid" => System::createUUID(),
"parent_type" => "Post",
"parent_guid" => $item["guid"]];