Merge pull request #5230 from annando/new-item-uri

New function for generating item URI
This commit is contained in:
Hypolite Petovan 2018-06-16 10:54:56 -04:00 committed by GitHub
commit 7d1bb9ecf4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 51 additions and 45 deletions

View file

@ -576,7 +576,7 @@ function item_post(App $a) {
$notify_type = ($parent ? 'comment-new' : 'wall-new');
$uri = ($message_id ? $message_id : item_new_uri($a->get_hostname(), $profile_uid, $guid));
$uri = ($message_id ? $message_id : Item::newURI($profile_uid, $guid));
// Fallback so that we alway have a parent uri
if (!$thr_parent_uri || !$parent) {

View file

@ -454,7 +454,7 @@ function photos_post(App $a)
if (!$item_id) {
// Create item container
$title = '';
$uri = item_new_uri($a->get_hostname(),$page_owner_uid);
$uri = Item::newURI($page_owner_uid);
$arr = [];
$arr['guid'] = get_guid(32);
@ -624,7 +624,7 @@ function photos_post(App $a)
if (count($taginfo)) {
foreach ($taginfo as $tagged) {
$uri = item_new_uri($a->get_hostname(), $page_owner_uid);
$uri = Item::newURI($page_owner_uid);
$arr = [];
$arr['guid'] = get_guid(32);
@ -848,7 +848,7 @@ function photos_post(App $a)
$smallest = 2;
}
$uri = item_new_uri($a->get_hostname(), $page_owner_uid);
$uri = Item::newURI($page_owner_uid);
// Create item container
$lat = $lon = null;

View file

@ -92,7 +92,7 @@ function poke_init(App $a) {
$poster = $a->contact;
$uri = item_new_uri($a->get_hostname(), $uid);
$uri = Item::newURI($uid);
$arr = [];

View file

@ -92,7 +92,7 @@ function subthread_content(App $a) {
return;
}
$uri = item_new_uri($a->get_hostname(),$owner_uid);
$uri = Item::newURI($owner_uid);
$post_type = (($item['resource-id']) ? L10n::t('photo') : L10n::t('status'));
$objtype = (($item['resource-id']) ? ACTIVITY_OBJ_IMAGE : ACTIVITY_OBJ_NOTE );

View file

@ -65,7 +65,7 @@ function tagger_content(App $a) {
return;
}
$uri = item_new_uri($a->get_hostname(),$owner_uid);
$uri = Item::newURI($owner_uid);
$xterm = xmlify($term);
$post_type = (($item['resource-id']) ? L10n::t('photo') : L10n::t('status'));
$targettype = (($item['resource-id']) ? ACTIVITY_OBJ_IMAGE : ACTIVITY_OBJ_NOTE );