diff options
author | Friendika <info@friendika.com> | 2011-09-21 17:37:02 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-09-21 17:37:02 -0700 |
commit | 9161d1832ee60aa177d8d66352de40e9aab901b6 (patch) | |
tree | e1dc91453b6bc34429fd1a861aaac08424931d96 | |
parent | 542aa22eb94e0f20806552b83cec2e46cf3b6f1b (diff) | |
download | volse-hubzilla-9161d1832ee60aa177d8d66352de40e9aab901b6.tar.gz volse-hubzilla-9161d1832ee60aa177d8d66352de40e9aab901b6.tar.bz2 volse-hubzilla-9161d1832ee60aa177d8d66352de40e9aab901b6.zip |
allow one to toggle into and out of photo edit mode for an entire album
-rw-r--r-- | mod/photos.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mod/photos.php b/mod/photos.php index 72f2abd56..424cc17b7 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1009,8 +1009,9 @@ function photos_content(&$a) { break; } } - $prevlink = $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $prvnxt[$prv]['resource-id'] ; - $nextlink = $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $prvnxt[$nxt]['resource-id'] ; + $edit_suffix = ((($cmd === 'edit') && ($can_post)) ? '/edit' : ''); + $prevlink = $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $prvnxt[$prv]['resource-id'] . $edit_suffix; + $nextlink = $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $prvnxt[$nxt]['resource-id'] . $edit_suffix; } @@ -1033,7 +1034,7 @@ function photos_content(&$a) { if($can_post && ($ph[0]['uid'] == $owner_uid)) { $tools = array( - 'edit' => array($a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $datum . '/edit', t('Edit photo')), + 'edit' => array($a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $datum . (($cmd === 'edit') ? '' : '/edit'), (($cmd === 'edit') ? t('View photo') : t('Edit photo'))), 'profile'=>array($a->get_baseurl() . '/profile_photo/use/'.$ph[0]['resource-id'], t('Use as profile photo')), ); |