aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-11-15 16:34:09 -0800
committerzotlabs <mike@macgirvin.com>2018-11-15 16:34:09 -0800
commit39d914c9dfe87021351cb2aad9feedd381e791ec (patch)
treef13c34440bc702085f7d7031a7d14ebb5e006285 /include
parent8d2f4d9dfd90d218a68e0e36ccf537d800b09755 (diff)
downloadvolse-hubzilla-39d914c9dfe87021351cb2aad9feedd381e791ec.tar.gz
volse-hubzilla-39d914c9dfe87021351cb2aad9feedd381e791ec.tar.bz2
volse-hubzilla-39d914c9dfe87021351cb2aad9feedd381e791ec.zip
add item.uuid to relevant places
Diffstat (limited to 'include')
-rw-r--r--include/activities.php3
-rw-r--r--include/attach.php14
-rw-r--r--include/event.php7
-rw-r--r--include/help.php3
-rw-r--r--include/import.php3
-rwxr-xr-xinclude/items.php3
-rw-r--r--include/photos.php8
7 files changed, 28 insertions, 13 deletions
diff --git a/include/activities.php b/include/activities.php
index 9b83f7a5c..68c995338 100644
--- a/include/activities.php
+++ b/include/activities.php
@@ -16,7 +16,8 @@ function profile_activity($changed, $value) {
return;
$arr = array();
- $arr['mid'] = $arr['parent_mid'] = item_message_id();
+ $arr['uuid'] = item_message_id();
+ $arr['mid'] = $arr['parent_mid'] = z_root() . '/item/' . $arr['uuid'];
$arr['uid'] = local_channel();
$arr['aid'] = $self['channel_account_id'];
$arr['owner_xchan'] = $arr['author_xchan'] = $self['xchan_hash'];
diff --git a/include/attach.php b/include/attach.php
index 4db5bc435..6b0d3fb3b 100644
--- a/include/attach.php
+++ b/include/attach.php
@@ -1759,16 +1759,18 @@ function file_activity($channel_id, $object, $allow_cid, $allow_gid, $deny_cid,
$arr_allow_cid = check_list_permissions($channel_id, $arr_allow_cid, 'view_storage');
}
- $mid = item_message_id();
+ $uuid = item_message_id();
+ $mid = z_root() . '/item/' . $uuid;
$objtype = ACTIVITY_OBJ_FILE;
$arr = array();
$arr['aid'] = get_account_id();
$arr['uid'] = $channel_id;
- $arr['item_wall'] = 1;
- $arr['item_origin'] = 1;
- $arr['item_unseen'] = 1;
+ $arr['uuid'] = $uuid;
+ $arr['item_wall'] = 1;
+ $arr['item_origin'] = 1;
+ $arr['item_unseen'] = 1;
$arr['author_xchan'] = $poster['xchan_hash'];
$arr['owner_xchan'] = $poster['xchan_hash'];
$arr['title'] = '';
@@ -1813,8 +1815,10 @@ function file_activity($channel_id, $object, $allow_cid, $allow_gid, $deny_cid,
$private = (($u_arr_allow_cid[0] || $u_arr_allow_gid[0] || $u_arr_deny_cid[0] || $u_arr_deny_gid[0]) ? 1 : 0);
- $u_mid = item_message_id();
+ $uuid = item_message_id();
+ $u_mid = z_root() . '/item/' . $uuid;
+ $arr['uuid'] = $uuid;
$arr['mid'] = $u_mid;
$arr['parent_mid'] = $u_mid;
$arr['allow_cid'] = perms2str($u_arr_allow_cid);
diff --git a/include/event.php b/include/event.php
index 84a16e8be..a34250e7a 100644
--- a/include/event.php
+++ b/include/event.php
@@ -1125,11 +1125,14 @@ function event_store_item($arr, $event) {
}
}
- if(! $arr['mid'])
- $arr['mid'] = item_message_id();
+ if(! $arr['mid']) {
+ $arr['uuid'] = item_message_id();
+ $arr['mid'] = z_root() . '/item/' . $arr['uuid'];
+ }
$item_arr['aid'] = $z[0]['channel_account_id'];
$item_arr['uid'] = $arr['uid'];
+ $item_arr['uuid'] = $arr['uuid'];
$item_arr['author_xchan'] = $arr['event_xchan'];
$item_arr['mid'] = $arr['mid'];
$item_arr['parent_mid'] = $arr['mid'];
diff --git a/include/help.php b/include/help.php
index 3b56a7238..f2aa4add3 100644
--- a/include/help.php
+++ b/include/help.php
@@ -351,7 +351,8 @@ function store_doc_file($s) {
$x = item_store_update($item);
}
else {
- $item['mid'] = $item['parent_mid'] = item_message_id();
+ $item['uuid'] = $item_message_id();
+ $item['mid'] = $item['parent_mid'] = z_root() . '/item/' . $item['uuid'];
$x = item_store($item);
}
diff --git a/include/import.php b/include/import.php
index 6476aa688..53b21c317 100644
--- a/include/import.php
+++ b/include/import.php
@@ -1520,7 +1520,8 @@ function import_webpage_element($element, $channel, $type) {
}
else { // otherwise, generate the creation times and unique id
$arr['created'] = datetime_convert('UTC', 'UTC');
- $arr['mid'] = $arr['parent_mid'] = item_message_id();
+ $arr['uuid'] = item_message_id();
+ $arr['mid'] = $arr['parent_mid'] = z_root() . '/item/' . $arr['uuid'];
}
// Update the edited time whether or not the element already exists
$arr['edited'] = datetime_convert('UTC', 'UTC');
diff --git a/include/items.php b/include/items.php
index 3d707a492..2baad3d04 100755
--- a/include/items.php
+++ b/include/items.php
@@ -4765,7 +4765,8 @@ function item_create_edit_activity($post) {
$new_item['id'] = 0;
$new_item['parent'] = 0;
- $new_item['mid'] = item_message_id();
+ $new_item['uuid'] = item_message_id();
+ $new_item['mid'] = z_root() . '/item/' . $new_item['uuid'];
$new_item['body'] = sprintf( t('[Edited %s]'), (($update_item['item_thread_top']) ? t('Post','edit_activity') : t('Comment','edit_activity')));
diff --git a/include/photos.php b/include/photos.php
index d5553b495..ae51703e0 100644
--- a/include/photos.php
+++ b/include/photos.php
@@ -441,11 +441,13 @@ function photo_upload($channel, $observer, $args) {
}
}
else {
- $mid = item_message_id();
+ $uuid = item_message_id();
+ $mid = z_root() . '/item/' . $uuid;
$arr = [
'aid' => $account_id,
'uid' => $channel_id,
+ 'uuid' => $uuid,
'mid' => $mid,
'parent_mid' => $mid,
'item_hidden' => $item_hidden,
@@ -827,12 +829,14 @@ function photos_create_item($channel, $creator_hash, $photo, $visible = false) {
$item_hidden = (($visible) ? 0 : 1 );
- $mid = item_message_id();
+ $uuid = item_message_id();
+ $mid = z_root() . '/item/' . $uuid;
$arr = array();
$arr['aid'] = $channel['channel_account_id'];
$arr['uid'] = $channel['channel_id'];
+ $arr['uuid'] = $uuid;
$arr['mid'] = $mid;
$arr['parent_mid'] = $mid;
$arr['item_wall'] = 1;