aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authormarijus <mario@mariovavti.com>2014-11-03 11:19:27 +0100
committermarijus <mario@mariovavti.com>2014-11-03 11:19:27 +0100
commit287d5e0f106eed3783ee120bafc338e7763e36e9 (patch)
tree88a0dd017a3ff64795a33149b6b6de0f1398b190 /mod
parent2f85d12a6c6bcaeb5e5197a86863b6915ab93ddb (diff)
downloadvolse-hubzilla-287d5e0f106eed3783ee120bafc338e7763e36e9.tar.gz
volse-hubzilla-287d5e0f106eed3783ee120bafc338e7763e36e9.tar.bz2
volse-hubzilla-287d5e0f106eed3783ee120bafc338e7763e36e9.zip
if uploading a photo go away to album
Diffstat (limited to 'mod')
-rw-r--r--mod/photos.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/mod/photos.php b/mod/photos.php
index 51ac4c25c..eb634259f 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -428,8 +428,11 @@ function photos_post(&$a) {
if(! $r['success']) {
notice($r['message'] . EOL);
}
-
- goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
+
+ if($_REQUEST['newalbum'])
+ goaway($a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address'] . '/album/' . bin2hex($_REQUEST['newalbum']));
+ else
+ goaway($a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address'] . '/album/' . bin2hex(datetime_convert('UTC',date_default_timezone_get(),'now', 'Y')));
}
@@ -610,6 +613,8 @@ function photos_content(&$a) {
if(count($r)) {
$a->set_pager_total(count($r));
$a->set_pager_itemspage(60);
+ } else {
+ goaway($a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address']);
}
if($_GET['order'] === 'posted')