diff options
author | Manuel Jiménez Friaza <mjfriaza@openmailbox.org> | 2018-11-24 13:01:01 +0100 |
---|---|---|
committer | Manuel Jiménez Friaza <mjfriaza@openmailbox.org> | 2018-11-24 13:01:01 +0100 |
commit | f865d6e5dab19122fffc677da495b21d3d5e93e7 (patch) | |
tree | 8631750db2c385438207326479350ea909a625b4 /include/attach.php | |
parent | 0bba9482dfbcc0fd8bea880ac3820548281ecfc2 (diff) | |
parent | bc9f2922e0e255e97cb607d099f60c8a81c4736f (diff) | |
download | volse-hubzilla-f865d6e5dab19122fffc677da495b21d3d5e93e7.tar.gz volse-hubzilla-f865d6e5dab19122fffc677da495b21d3d5e93e7.tar.bz2 volse-hubzilla-f865d6e5dab19122fffc677da495b21d3d5e93e7.zip |
Resolved merge conflicts
Diffstat (limited to 'include/attach.php')
-rw-r--r-- | include/attach.php | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/include/attach.php b/include/attach.php index 4db5bc435..dd718aa14 100644 --- a/include/attach.php +++ b/include/attach.php @@ -739,7 +739,7 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) { } if(! $hash) - $hash = random_string(); + $hash = new_uuid(); // Check storage limits if($options !== 'update') { @@ -1122,7 +1122,7 @@ function attach_mkdir($channel, $observer_hash, $arr = null) { return $ret; } - $arr['hash'] = (($arr['hash']) ? $arr['hash'] : random_string()); + $arr['hash'] = (($arr['hash']) ? $arr['hash'] : new_uuid()); // Check for duplicate name. // Check both the filename and the hash as we will be making use of both. @@ -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); |