$origin = $_REQUEST['origin'];
}
- $uri = Item::newURI($api_source ? $profile_uid : $uid, $guid);
+ $uri = Item::newURI($guid);
// Fallback so that we alway have a parent uri
if (!$thr_parent_uri || !$toplevel_item_id) {
if (DBA::isResult($photos) && !$item_id) {
// Create item container
$title = '';
- $uri = Item::newURI($page_owner_uid);
+ $uri = Item::newURI();
$arr = [];
$arr['guid'] = System::createUUID();
if (count($taginfo)) {
foreach ($taginfo as $tagged) {
- $uri = Item::newURI($page_owner_uid);
+ $uri = Item::newURI();
$arr = [];
$arr['guid'] = System::createUUID();
$smallest = 2;
}
- $uri = Item::newURI($page_owner_uid);
+ $uri = Item::newURI();
// Create item container
$lat = $lon = null;
return;
}
- $uri = Item::newURI($owner_uid);
+ $uri = Item::newURI();
$xterm = XML::escape($term);
$post_type = (($item['resource-id']) ? DI::l10n()->t('photo') : DI::l10n()->t('status'));
$targettype = (($item['resource-id']) ? Activity\ObjectType::IMAGE : Activity\ObjectType::NOTE );
$event['uid'] = intval($arr['uid'] ?? 0);
$event['cid'] = intval($arr['cid'] ?? 0);
$event['guid'] = ($arr['guid'] ?? '') ?: System::createUUID();
- $event['uri'] = ($arr['uri'] ?? '') ?: Item::newURI($event['uid'], $event['guid']);
+ $event['uri'] = ($arr['uri'] ?? '') ?: Item::newURI($event['guid']);
$event['uri-id'] = ItemURI::insert(['uri' => $event['uri'], 'guid' => $event['guid']]);
$event['type'] = ($arr['type'] ?? '') ?: 'event';
$event['summary'] = $arr['summary'] ?? '';
$uid = intval($item['uid']);
$item['guid'] = self::guid($item, $notify);
- $item['uri'] = substr(trim($item['uri'] ?? '') ?: self::newURI($item['uid'], $item['guid']), 0, 255);
+ $item['uri'] = substr(trim($item['uri'] ?? '') ?: self::newURI($item['guid']), 0, 255);
// Store URI data
$item['uri-id'] = ItemURI::insert(['uri' => $item['uri'], 'guid' => $item['guid']]);
/**
* generate an unique URI
*
- * @param integer $uid User id
- * @param string $guid An existing GUID (Otherwise it will be generated)
+ * @param string $guid An existing GUID (Otherwise it will be generated)
*
* @return string
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
- public static function newURI(int $uid, string $guid = ''): string
+ public static function newURI(string $guid = ''): string
{
if ($guid == '') {
$guid = System::createUUID();
$old_uri_id = $datarray["uri-id"] ?? 0;
$datarray["guid"] = System::createUUID();
unset($datarray["plink"]);
- $datarray["uri"] = self::newURI($contact['uid'], $datarray["guid"]);
+ $datarray["uri"] = self::newURI($datarray["guid"]);
$datarray["uri-id"] = ItemURI::getIdByURI($datarray["uri"]);
$datarray["extid"] = Protocol::DFRN;
$urlpart = parse_url($datarray2['author-link']);
$new_item = [
'guid' => System::createUUID(),
- 'uri' => self::newURI($item['uid']),
+ 'uri' => self::newURI(),
'uid' => $item['uid'],
'contact-id' => $owner['id'],
'wall' => $item['wall'],
Photo::setPermissionFromBody($body, local_user(), $me['id'], '<' . $contact['id'] . '>', '', '', '');
$guid = System::createUUID();
- $uri = Item::newURI(local_user(), $guid);
+ $uri = Item::newURI($guid);
$convid = 0;
$reply = false;
}
$guid = System::createUUID();
- $uri = Item::newURI(local_user(), $guid);
+ $uri = Item::newURI($guid);
$me = Contact::getByURL($replyto);
if (!$me['name']) {
if (!empty($request['scheduled_at'])) {
$item['guid'] = Item::guid($item, true);
- $item['uri'] = Item::newURI($item['uid'], $item['guid']);
+ $item['uri'] = Item::newURI($item['guid']);
$id = Post\Delayed::add($item['uri'], $item, PRIORITY_HIGH, Post\Delayed::PREPARED, $request['scheduled_at']);
if (empty($id)) {
DI::mstdnError()->InternalError();
$actor = Contact::getById($a->getContactId());
- $uri = Model\Item::newURI($uid);
+ $uri = Model\Item::newURI();
$arr = [];
}
if ($type == 'Delete') {
- $data['id'] = Item::newURI($item['uid'], $item['guid']) . '/' . $type;;
+ $data['id'] = Item::newURI($item['guid']) . '/' . $type;;
} elseif (($item['gravity'] == GRAVITY_ACTIVITY) && ($type != 'Undo')) {
$data['id'] = $item['uri'];
} else {
// Additionally we have to avoid conflicts with identical URI between imported feeds and these items.
if ($notify) {
$item['guid'] = Item::guidFromUri($orig_plink, DI::baseUrl()->getHostname());
- $item['uri'] = Item::newURI($item['uid'], $item['guid']);
+ $item['uri'] = Item::newURI($item['guid']);
unset($item['thr-parent']);
unset($item['parent-uri']);