moved get_guid to System::createGUID

This commit is contained in:
Philipp Holzer 2018-07-09 21:38:16 +02:00
parent 3a179860e5
commit c829e43725
No known key found for this signature in database
GPG key ID: 58160D7D6AF942B6
21 changed files with 105 additions and 88 deletions

View file

@ -1075,7 +1075,7 @@ class Item extends BaseObject
} elseif (!empty($item['uri'])) {
$guid = self::guidFromUri($item['uri'], $prefix_host);
} else {
$guid = get_guid(32, hash('crc32', $prefix_host));
$guid = System::createGUID(32, hash('crc32', $prefix_host));
}
return $guid;
@ -2172,7 +2172,7 @@ class Item extends BaseObject
public static function newURI($uid, $guid = "")
{
if ($guid == "") {
$guid = get_guid(32);
$guid = System::createGUID(32);
}
$hostname = self::getApp()->get_hostname();
@ -2496,7 +2496,7 @@ class Item extends BaseObject
}
if ($contact['network'] != NETWORK_FEED) {
$datarray["guid"] = get_guid(32);
$datarray["guid"] = System::createGUID(32);
unset($datarray["plink"]);
$datarray["uri"] = self::newURI($contact['uid'], $datarray["guid"]);
$datarray["parent-uri"] = $datarray["uri"];
@ -2933,7 +2933,7 @@ class Item extends BaseObject
$objtype = $item['resource-id'] ? ACTIVITY_OBJ_IMAGE : ACTIVITY_OBJ_NOTE ;
$new_item = [
'guid' => get_guid(32),
'guid' => System::createGUID(32),
'uri' => self::newURI($item['uid']),
'uid' => $item['uid'],
'contact-id' => $item_contact_id,