From 9f5d3000c74253a1284abda16006d74df84073fe Mon Sep 17 00:00:00 2001 From: Friendika Date: Mon, 7 Feb 2011 21:16:39 -0800 Subject: don't change photo visibility if only album name was changed --- mod/photos.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mod') 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]'; -- cgit v1.2.3