more message restrict conversions

This commit is contained in:
friendica
2015-01-29 14:51:41 -08:00
parent a2cdd1499c
commit ff68ea6087
18 changed files with 76 additions and 73 deletions
+14 -15
View File
@@ -225,7 +225,7 @@ function photo_upload($channel, $observer, $args) {
// Create item container
$item_restrict = (($visible) ? ITEM_VISIBLE : ITEM_HIDDEN);
$item_hidden = (($visible) ? 0 : 1 );
$title = '';
$mid = item_message_id();
@@ -235,8 +235,7 @@ function photo_upload($channel, $observer, $args) {
$arr['uid'] = $channel_id;
$arr['mid'] = $mid;
$arr['parent_mid'] = $mid;
$arr['item_flags'] = $item_flags;
$arr['item_restrict'] = $item_restrict;
$arr['item_hidden'] = $item_hidden;
$arr['resource_type'] = 'photo';
$arr['resource_id'] = $photo_hash;
$arr['owner_xchan'] = $channel['channel_hash'];
@@ -446,7 +445,7 @@ function photos_create_item($channel, $creator_hash, $photo, $visible = false) {
// Create item container
$item_restrict = (($visible) ? ITEM_VISIBLE : ITEM_HIDDEN);
$item_hidden = (($visible) ? 0 : 1 );
$title = '';
$mid = item_message_id();
@@ -460,20 +459,20 @@ function photos_create_item($channel, $creator_hash, $photo, $visible = false) {
$arr['item_wall'] = 1;
$arr['item_origin'] = 1;
$arr['item_thread_top'] = 1;
$arr['item_restrict'] = $item_restrict;
$arr['resource_type'] = 'photo';
$arr['resource_id'] = $photo['resource_id'];
$arr['owner_xchan'] = $channel['channel_hash'];
$arr['author_xchan'] = $creator_hash;
$arr['item_hidden'] = $item_hidden;
$arr['resource_type'] = 'photo';
$arr['resource_id'] = $photo['resource_id'];
$arr['owner_xchan'] = $channel['channel_hash'];
$arr['author_xchan'] = $creator_hash;
$arr['allow_cid'] = $photo['allow_cid'];
$arr['allow_gid'] = $photo['allow_gid'];
$arr['deny_cid'] = $photo['deny_cid'];
$arr['deny_gid'] = $photo['deny_gid'];
$arr['allow_cid'] = $photo['allow_cid'];
$arr['allow_gid'] = $photo['allow_gid'];
$arr['deny_cid'] = $photo['deny_cid'];
$arr['deny_gid'] = $photo['deny_gid'];
$arr['plink'] = z_root() . '/channel/' . $channel['channel_address'] . '/?f=&mid=' . $arr['mid'];
$arr['plink'] = z_root() . '/channel/' . $channel['channel_address'] . '/?f=&mid=' . $arr['mid'];
$arr['body'] = '[zrl=' . z_root() . '/photos/' . $channel['channel_address'] . '/image/' . $photo['resource_id'] . ']'
$arr['body'] = '[zrl=' . z_root() . '/photos/' . $channel['channel_address'] . '/image/' . $photo['resource_id'] . ']'
. '[zmg]' . z_root() . '/photo/' . $photo['resource_id'] . '-' . $photo['scale'] . '[/zmg]'
. '[/zrl]';