aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-11-03 14:51:28 -0800
committerfriendica <info@friendica.com>2014-11-03 14:51:28 -0800
commitfdb9b9d52ed1959213a67b1313b617d0e4eb057f (patch)
tree99941674eaaef28467e610be302a584dcbd210b4 /mod
parenta6d8c3193a6fc243f3e516118c793e5b871b8247 (diff)
parent9984ff37e5df237ccdd0169387ade070babfd666 (diff)
downloadvolse-hubzilla-fdb9b9d52ed1959213a67b1313b617d0e4eb057f.tar.gz
volse-hubzilla-fdb9b9d52ed1959213a67b1313b617d0e4eb057f.tar.bz2
volse-hubzilla-fdb9b9d52ed1959213a67b1313b617d0e4eb057f.zip
Merge https://github.com/friendica/red into pending_merge
Diffstat (limited to 'mod')
-rw-r--r--mod/photos.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/mod/photos.php b/mod/photos.php
index 48bc6d1e5..eb634259f 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -196,7 +196,7 @@ function photos_post(&$a) {
}
}
- goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
+ goaway($a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address'] . '/album/' . $_SESSION['album_return']);
}
if(($a->argc > 2) && ((x($_POST,'desc') !== false) || (x($_POST,'newtag') !== false)) || (x($_POST,'albname') !== false)) {
@@ -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')
@@ -918,6 +923,8 @@ function photos_content(&$a) {
$aclselect_e = populate_acl($ph[0]);
$albums = ((array_key_exists('albums', $a->data)) ? $a->data['albums'] : photos_albums_list($a->data['channel'],$a->data['observer']));
+ $_SESSION['album_return'] = bin2hex($ph[0]['album']);
+
$edit = array(
'edit' => t('Edit photo'),
'id' => $link_item['id'],