change album_id logic to make it work with ajax calls
This commit is contained in:
parent
69c9f4588c
commit
0df4f9c114
@ -1299,7 +1299,6 @@ function widget_album($args) {
|
|||||||
//edit album name
|
//edit album name
|
||||||
$album_edit = null;
|
$album_edit = null;
|
||||||
|
|
||||||
|
|
||||||
$photos = array();
|
$photos = array();
|
||||||
if($r) {
|
if($r) {
|
||||||
$twist = 'rotright';
|
$twist = 'rotright';
|
||||||
|
@ -765,6 +765,7 @@ function photos_content(&$a) {
|
|||||||
if($photos) {
|
if($photos) {
|
||||||
$o = replace_macros(get_markup_template('photosajax.tpl'),array(
|
$o = replace_macros(get_markup_template('photosajax.tpl'),array(
|
||||||
'$photos' => $photos,
|
'$photos' => $photos,
|
||||||
|
'$album_id' => bin2hex($album)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -779,7 +780,7 @@ function photos_content(&$a) {
|
|||||||
$o .= replace_macros($tpl, array(
|
$o .= replace_macros($tpl, array(
|
||||||
'$photos' => $photos,
|
'$photos' => $photos,
|
||||||
'$album' => $album,
|
'$album' => $album,
|
||||||
'$album_id' => rand(),
|
'$album_id' => bin2hex($album),
|
||||||
'$album_edit' => array(t('Edit Album'), $album_edit),
|
'$album_edit' => array(t('Edit Album'), $album_edit),
|
||||||
'$can_post' => $can_post,
|
'$can_post' => $can_post,
|
||||||
'$upload' => array(t('Upload'), $a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address'] . '/upload/' . bin2hex($album)),
|
'$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) {
|
if($photos) {
|
||||||
$o = replace_macros(get_markup_template('photosajax.tpl'),array(
|
$o = replace_macros(get_markup_template('photosajax.tpl'),array(
|
||||||
'$photos' => $photos,
|
'$photos' => $photos,
|
||||||
|
'$album_id' => bin2hex(t('Recent Photos'))
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1314,7 +1316,7 @@ function photos_content(&$a) {
|
|||||||
$tpl = get_markup_template('photos_recent.tpl');
|
$tpl = get_markup_template('photos_recent.tpl');
|
||||||
$o .= replace_macros($tpl, array(
|
$o .= replace_macros($tpl, array(
|
||||||
'$title' => t('Recent Photos'),
|
'$title' => t('Recent Photos'),
|
||||||
'$album_id' => rand(),
|
'$album_id' => bin2hex(t('Recent Photos')),
|
||||||
'$can_post' => $can_post,
|
'$can_post' => $can_post,
|
||||||
'$upload' => array(t('Upload'), $a->get_baseurl().'/photos/'.$a->data['channel']['channel_address'].'/upload'),
|
'$upload' => array(t('Upload'), $a->get_baseurl().'/photos/'.$a->data['channel']['channel_address'].'/upload'),
|
||||||
'$photos' => $photos,
|
'$photos' => $photos,
|
||||||
|
Reference in New Issue
Block a user