moved get_guid to System::createGUID
This commit is contained in:
parent
3a179860e5
commit
c829e43725
21 changed files with 105 additions and 88 deletions
|
@ -232,7 +232,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' , NETWORK_DFRN)));
|
||||
$guid = get_guid(32);
|
||||
$guid = System::createGUID(32);
|
||||
|
||||
$postopts = defaults($_REQUEST, 'postopts', '');
|
||||
|
||||
|
|
|
@ -453,7 +453,7 @@ function photos_post(App $a)
|
|||
$uri = Item::newURI($page_owner_uid);
|
||||
|
||||
$arr = [];
|
||||
$arr['guid'] = get_guid(32);
|
||||
$arr['guid'] = System::createGUID(32);
|
||||
$arr['uid'] = $page_owner_uid;
|
||||
$arr['uri'] = $uri;
|
||||
$arr['parent-uri'] = $uri;
|
||||
|
@ -620,7 +620,7 @@ function photos_post(App $a)
|
|||
$uri = Item::newURI($page_owner_uid);
|
||||
|
||||
$arr = [];
|
||||
$arr['guid'] = get_guid(32);
|
||||
$arr['guid'] = System::createGUID(32);
|
||||
$arr['uid'] = $page_owner_uid;
|
||||
$arr['uri'] = $uri;
|
||||
$arr['parent-uri'] = $uri;
|
||||
|
@ -856,7 +856,7 @@ function photos_post(App $a)
|
|||
$arr['coord'] = $lat . ' ' . $lon;
|
||||
}
|
||||
|
||||
$arr['guid'] = get_guid(32);
|
||||
$arr['guid'] = System::createGUID(32);
|
||||
$arr['uid'] = $page_owner_uid;
|
||||
$arr['uri'] = $uri;
|
||||
$arr['parent-uri'] = $uri;
|
||||
|
|
|
@ -96,7 +96,7 @@ function poke_init(App $a) {
|
|||
|
||||
$arr = [];
|
||||
|
||||
$arr['guid'] = get_guid(32);
|
||||
$arr['guid'] = System::createGUID(32);
|
||||
$arr['uid'] = $uid;
|
||||
$arr['uri'] = $uri;
|
||||
$arr['parent-uri'] = ($parent_uri ? $parent_uri : $uri);
|
||||
|
|
|
@ -188,7 +188,7 @@ function proxy_init(App $a) {
|
|||
die();
|
||||
}
|
||||
|
||||
$fields = ['uid' => 0, 'contact-id' => 0, 'guid' => get_guid(), 'resource-id' => $urlhash, 'created' => DateTimeFormat::utcNow(), 'edited' => DateTimeFormat::utcNow(),
|
||||
$fields = ['uid' => 0, 'contact-id' => 0, 'guid' => System::createGUID(), 'resource-id' => $urlhash, 'created' => DateTimeFormat::utcNow(), 'edited' => DateTimeFormat::utcNow(),
|
||||
'filename' => basename($_REQUEST['url']), 'type' => '', 'album' => '', 'height' => imagesy($image), 'width' => imagesx($image),
|
||||
'datasize' => 0, 'data' => $img_str, 'scale' => 100, 'profile' => 0,
|
||||
'allow_cid' => '', 'allow_gid' => '', 'deny_cid' => '', 'deny_gid' => '', 'desc' => $mime];
|
||||
|
|
|
@ -118,7 +118,7 @@ EOT;
|
|||
|
||||
$arr = [];
|
||||
|
||||
$arr['guid'] = get_guid(32);
|
||||
$arr['guid'] = System::createGUID(32);
|
||||
$arr['uri'] = $uri;
|
||||
$arr['uid'] = $owner_uid;
|
||||
$arr['contact-id'] = $contact['id'];
|
||||
|
|
|
@ -115,7 +115,7 @@ EOT;
|
|||
|
||||
$arr = [];
|
||||
|
||||
$arr['guid'] = get_guid(32);
|
||||
$arr['guid'] = System::createGUID(32);
|
||||
$arr['uri'] = $uri;
|
||||
$arr['uid'] = $owner_uid;
|
||||
$arr['contact-id'] = $contact['id'];
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
use Friendica\App;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Mimetype;
|
||||
|
@ -121,7 +122,7 @@ function wall_attach_post(App $a) {
|
|||
|
||||
$filedata = @file_get_contents($src);
|
||||
$mimetype = Mimetype::getContentType($filename);
|
||||
$hash = get_guid(64);
|
||||
$hash = System::createGUID(64);
|
||||
$created = DateTimeFormat::utcNow();
|
||||
|
||||
$fields = ['uid' => $page_owner_uid, 'hash' => $hash, 'filename' => $filename, 'filetype' => $mimetype,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue