aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2015-12-07 13:27:35 +0100
committerMario Vavti <mario@mariovavti.com>2015-12-07 13:27:35 +0100
commit0df4f9c114529478468fa1dbe9ab6032eded4db2 (patch)
tree35f2efd05d438a804b79cae549d34618bdd83a80
parent69c9f4588c57a1159ab18c5987f99ea5471579d5 (diff)
downloadvolse-hubzilla-0df4f9c114529478468fa1dbe9ab6032eded4db2.tar.gz
volse-hubzilla-0df4f9c114529478468fa1dbe9ab6032eded4db2.tar.bz2
volse-hubzilla-0df4f9c114529478468fa1dbe9ab6032eded4db2.zip
change album_id logic to make it work with ajax calls
-rw-r--r--include/widgets.php1
-rw-r--r--mod/photos.php6
2 files changed, 4 insertions, 3 deletions
diff --git a/include/widgets.php b/include/widgets.php
index bdb4cfa69..4b14d6c94 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -1299,7 +1299,6 @@ function widget_album($args) {
//edit album name
$album_edit = null;
-
$photos = array();
if($r) {
$twist = 'rotright';
diff --git a/mod/photos.php b/mod/photos.php
index 5a55123cc..5b3367d40 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -765,6 +765,7 @@ function photos_content(&$a) {
if($photos) {
$o = replace_macros(get_markup_template('photosajax.tpl'),array(
'$photos' => $photos,
+ '$album_id' => bin2hex($album)
));
}
else {
@@ -779,7 +780,7 @@ function photos_content(&$a) {
$o .= replace_macros($tpl, array(
'$photos' => $photos,
'$album' => $album,
- '$album_id' => rand(),
+ '$album_id' => bin2hex($album),
'$album_edit' => array(t('Edit Album'), $album_edit),
'$can_post' => $can_post,
'$upload' => array(t('Upload'), $a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address'] . '/upload/' . bin2hex($album)),
@@ -1301,6 +1302,7 @@ function photos_content(&$a) {
if($photos) {
$o = replace_macros(get_markup_template('photosajax.tpl'),array(
'$photos' => $photos,
+ '$album_id' => bin2hex(t('Recent Photos'))
));
}
else {
@@ -1314,7 +1316,7 @@ function photos_content(&$a) {
$tpl = get_markup_template('photos_recent.tpl');
$o .= replace_macros($tpl, array(
'$title' => t('Recent Photos'),
- '$album_id' => rand(),
+ '$album_id' => bin2hex(t('Recent Photos')),
'$can_post' => $can_post,
'$upload' => array(t('Upload'), $a->get_baseurl().'/photos/'.$a->data['channel']['channel_address'].'/upload'),
'$photos' => $photos,