aboutsummaryrefslogtreecommitdiffstats
path: root/mod/photos.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-02-07 21:16:39 -0800
committerFriendika <info@friendika.com>2011-02-07 21:16:39 -0800
commit9f5d3000c74253a1284abda16006d74df84073fe (patch)
treea3ad5f4024ecaf216cab20825255126bda4e748e /mod/photos.php
parent18c5d1ff90dd364328032b3f0092ac5176ebc4c5 (diff)
downloadvolse-hubzilla-9f5d3000c74253a1284abda16006d74df84073fe.tar.gz
volse-hubzilla-9f5d3000c74253a1284abda16006d74df84073fe.tar.bz2
volse-hubzilla-9f5d3000c74253a1284abda16006d74df84073fe.zip
don't change photo visibility if only album name was changed
Diffstat (limited to 'mod/photos.php')
-rw-r--r--mod/photos.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/mod/photos.php b/mod/photos.php
index 1a1ebaac1..9acde458d 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -268,6 +268,13 @@ foreach($_FILES AS $key => $val) {
intval($page_owner_uid)
);
}
+
+ /* Don't make the item visible if the only change was the album name */
+
+ $visibility = 0;
+ if($p[0]['desc'] !== $desc || strlen($rawtags))
+ $visibility = 1;
+
if(! $item_id) {
// Create item container
@@ -297,6 +304,7 @@ foreach($_FILES AS $key => $val) {
$arr['deny_cid'] = $p[0]['deny_cid'];
$arr['deny_gid'] = $p[0]['deny_gid'];
$arr['last-child'] = 1;
+ $arr['visible'] = $visibility;
$arr['body'] = '[url=' . $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $p[0]['resource-id'] . ']'
. '[img]' . $a->get_baseurl() . '/photo/' . $p[0]['resource-id'] . '-' . $p[0]['scale'] . '.jpg' . '[/img]'
. '[/url]';