item uuid changes
This commit is contained in:
@@ -393,7 +393,11 @@ function post_activity_item($arr, $allow_code = false, $deliver = true) {
|
||||
if(! array_key_exists('mimetype',$arr))
|
||||
$arr['mimetype'] = 'text/bbcode';
|
||||
|
||||
$arr['mid'] = ((x($arr,'mid')) ? $arr['mid'] : item_message_id());
|
||||
|
||||
if(! $arr['mid']) {
|
||||
$arr['uuid'] = ((x($arr,'uuid')) ? $arr['uuid'] : item_message_id());
|
||||
}
|
||||
$arr['mid'] = ((x($arr,'mid')) ? $arr['mid'] : z_root() . '/item/' . $arr['uuid']);
|
||||
$arr['parent_mid'] = ((x($arr,'parent_mid')) ? $arr['parent_mid'] : $arr['mid']);
|
||||
$arr['thr_parent'] = ((x($arr,'thr_parent')) ? $arr['thr_parent'] : $arr['mid']);
|
||||
|
||||
@@ -635,6 +639,7 @@ function get_item_elements($x,$allow_code = false) {
|
||||
if(mb_strlen($arr['title']) > 255)
|
||||
$arr['title'] = mb_substr($arr['title'],0,255);
|
||||
|
||||
$arr['uuid'] = (($x['uuid']) ? htmlspecialchars($x['uuid'], ENT_COMPAT,'UTF-8',false) : '');
|
||||
$arr['app'] = (($x['app']) ? htmlspecialchars($x['app'], ENT_COMPAT,'UTF-8',false) : '');
|
||||
$arr['route'] = (($x['route']) ? htmlspecialchars($x['route'], ENT_COMPAT,'UTF-8',false) : '');
|
||||
$arr['mid'] = (($x['message_id']) ? htmlspecialchars($x['message_id'], ENT_COMPAT,'UTF-8',false) : '');
|
||||
@@ -1070,6 +1075,7 @@ function encode_item($item,$mirror = false) {
|
||||
$x['item_blocked'] = $item['item_blocked'];
|
||||
}
|
||||
|
||||
$x['uuid'] = $item['uuid'];
|
||||
$x['message_id'] = $item['mid'];
|
||||
$x['message_top'] = $item['parent_mid'];
|
||||
$x['message_parent'] = $item['thr_parent'];
|
||||
@@ -1648,6 +1654,7 @@ function item_store($arr, $allow_exec = false, $deliver = true) {
|
||||
$arr['deny_gid'] = ((x($arr,'deny_gid')) ? trim($arr['deny_gid']) : '');
|
||||
$arr['postopts'] = ((x($arr,'postopts')) ? trim($arr['postopts']) : '');
|
||||
$arr['route'] = ((x($arr,'route')) ? trim($arr['route']) : '');
|
||||
$arr['uuid'] = ((x($arr,'uuid')) ? trim($arr['uuid']) : '');
|
||||
$arr['item_private'] = ((x($arr,'item_private')) ? intval($arr['item_private']) : 0 );
|
||||
$arr['item_wall'] = ((x($arr,'item_wall')) ? intval($arr['item_wall']) : 0 );
|
||||
$arr['item_type'] = ((x($arr,'item_type')) ? intval($arr['item_type']) : 0 );
|
||||
@@ -2183,6 +2190,7 @@ function item_store_update($arr, $allow_exec = false, $deliver = true) {
|
||||
$arr['route'] = ((array_key_exists('route',$arr)) ? trim($arr['route']) : $orig[0]['route']);
|
||||
|
||||
$arr['location'] = ((x($arr,'location')) ? notags(trim($arr['location'])) : $orig[0]['location']);
|
||||
$arr['uuid'] = ((x($arr,'uuid')) ? notags(trim($arr['uuid'])) : $orig[0]['uuid']);
|
||||
$arr['coord'] = ((x($arr,'coord')) ? notags(trim($arr['coord'])) : $orig[0]['coord']);
|
||||
$arr['verb'] = ((x($arr,'verb')) ? notags(trim($arr['verb'])) : $orig[0]['verb']);
|
||||
$arr['obj_type'] = ((x($arr,'obj_type')) ? notags(trim($arr['obj_type'])) : $orig[0]['obj_type']);
|
||||
|
||||
Reference in New Issue
Block a user