aboutsummaryrefslogtreecommitdiffstats
path: root/include/photos.php
diff options
context:
space:
mode:
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]';