aboutsummaryrefslogtreecommitdiffstats
path: root/include/photos.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-06-18 16:26:27 -0700
committerfriendica <info@friendica.com>2014-06-18 16:26:27 -0700
commitc16b403cf7adf293a0c51d127d38d5794f9c2b36 (patch)
treea13ff3ba359a32df7e3c8e2a957b630e1f624304 /include/photos.php
parent80d84206ed9744ce033942d0379a97834a33b11c (diff)
downloadvolse-hubzilla-c16b403cf7adf293a0c51d127d38d5794f9c2b36.tar.gz
volse-hubzilla-c16b403cf7adf293a0c51d127d38d5794f9c2b36.tar.bz2
volse-hubzilla-c16b403cf7adf293a0c51d127d38d5794f9c2b36.zip
oh this is nice... http://kmkeen.com/jshon - this is what we need to make shred -- well "shred". I also had to change the photos album list API a bit to fix any imagined and/or real parsing issues and also fixed shred so it can find its auxiliary files.
Diffstat (limited to 'include/photos.php')
-rw-r--r--include/photos.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/photos.php b/include/photos.php
index de4a9173a..9819c7ef2 100644
--- a/include/photos.php
+++ b/include/photos.php
@@ -277,6 +277,7 @@ function photos_albums_list($channel,$observer) {
if($albums) {
$ret['success'] = true;
+ $ret['albums'] = array();
foreach($albums as $k => $album) {
$entry = array(
'text' => $album['album'],
@@ -284,7 +285,7 @@ function photos_albums_list($channel,$observer) {
'url' => z_root() . '/photos/' . $channel['channel_address'] . '/album/' . bin2hex($album['album']),
'urlencode' => urlencode($album['album']),
'bin2hex' => bin2hex($album['album']));
- $ret[] = $entry;
+ $ret['albums'][] = $entry;
}
}
return $ret;
@@ -306,11 +307,11 @@ function photos_album_widget($channelx,$observer,$albums = null) {
$albums = photos_albums_list($channelx,$observer);
}
- if($albums) {
+ if($albums['success']) {
$o = replace_macros(get_markup_template('photo_albums.tpl'),array(
'$nick' => $channelx['channel_address'],
'$title' => t('Photo Albums'),
- '$albums' => $albums,
+ '$albums' => $albums['albums'],
'$baseurl' => z_root(),
'$upload' => ((perm_is_allowed($channelx['channel_id'],(($observer) ? $observer['xchan_hash'] : ''),'post_photos'))
? t('Upload New Photos') : '')