mirror of
https://github.com/friendica/friendica
synced 2025-04-26 03:50:12 +00:00
moved get_guid to System::createGUID
This commit is contained in:
parent
3a179860e5
commit
c829e43725
21 changed files with 105 additions and 88 deletions
|
@ -305,7 +305,7 @@ class Event extends BaseObject
|
|||
|
||||
Addon::callHooks('event_updated', $event['id']);
|
||||
} else {
|
||||
$event['guid'] = get_guid(32);
|
||||
$event['guid'] = System::createGUID(32);
|
||||
|
||||
// New event. Store it.
|
||||
dba::insert('event', $event);
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -47,7 +47,7 @@ class Mail
|
|||
return -2;
|
||||
}
|
||||
|
||||
$guid = get_guid(32);
|
||||
$guid = System::createGUID(32);
|
||||
$uri = 'urn:X-dfrn:' . System::baseUrl() . ':' . local_user() . ':' . $guid;
|
||||
|
||||
$convid = 0;
|
||||
|
@ -76,7 +76,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 = get_guid(32);
|
||||
$conv_guid = System::createGUID(32);
|
||||
$convuri = $recip_handle . ':' . $conv_guid;
|
||||
|
||||
$handles = $recip_handle . ';' . $sender_handle;
|
||||
|
@ -174,7 +174,7 @@ class Mail
|
|||
$subject = L10n::t('[no subject]');
|
||||
}
|
||||
|
||||
$guid = get_guid(32);
|
||||
$guid = System::createGUID(32);
|
||||
$uri = 'urn:X-dfrn:' . System::baseUrl() . ':' . local_user() . ':' . $guid;
|
||||
|
||||
$me = Probe::uri($replyto);
|
||||
|
@ -183,7 +183,7 @@ class Mail
|
|||
return -2;
|
||||
}
|
||||
|
||||
$conv_guid = get_guid(32);
|
||||
$conv_guid = System::createGUID(32);
|
||||
|
||||
$recip_handle = $recipient['nickname'] . '@' . substr(System::baseUrl(), strpos(System::baseUrl(), '://') + 3);
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ class Photo
|
|||
if (DBM::is_result($photo)) {
|
||||
$guid = $photo['guid'];
|
||||
} else {
|
||||
$guid = get_guid();
|
||||
$guid = System::createGUID();
|
||||
}
|
||||
|
||||
$existing_photo = dba::selectFirst('photo', ['id'], ['resource-id' => $rid, 'uid' => $uid, 'contact-id' => $cid, 'scale' => $scale]);
|
||||
|
@ -275,6 +275,6 @@ class Photo
|
|||
*/
|
||||
public static function newResource()
|
||||
{
|
||||
return get_guid(32, false);
|
||||
return system::createGUID(32, false);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue