if uploading a photo go away to album

This commit is contained in:
marijus 2014-11-03 11:19:27 +01:00
parent 2f85d12a6c
commit 287d5e0f10

View File

@ -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')