aboutsummaryrefslogtreecommitdiffstats
path: root/include/photos.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-01-29 14:51:41 -0800
committerfriendica <info@friendica.com>2015-01-29 14:51:41 -0800
commitff68ea608786a698ad46637ef13854ac1b1e6beb (patch)
tree5e9bec7525754dda60c8c08bc00802160efa202c /include/photos.php
parenta2cdd1499c968c31ae1b95933231f80be5fc639b (diff)
downloadvolse-hubzilla-ff68ea608786a698ad46637ef13854ac1b1e6beb.tar.gz
volse-hubzilla-ff68ea608786a698ad46637ef13854ac1b1e6beb.tar.bz2
volse-hubzilla-ff68ea608786a698ad46637ef13854ac1b1e6beb.zip
more message restrict conversions
Diffstat (limited to 'include/photos.php')
-rw-r--r--include/photos.php33
1 files changed, 16 insertions, 17 deletions
diff --git a/include/photos.php b/include/photos.php
index f52b08473..43386d626 100644
--- a/include/photos.php
+++ b/include/photos.php
@@ -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['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['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['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]';