1
0
Fork 0

moved get_guid to System::createGUID

This commit is contained in:
Philipp Holzer 2018-07-09 21:38:16 +02:00
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

@ -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', '');

View file

@ -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;

View file

@ -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);

View file

@ -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];

View file

@ -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'];

View file

@ -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'];

View file

@ -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,