diff options
author | marijus <mario@localhost.localdomain> | 2013-12-14 09:57:57 +0100 |
---|---|---|
committer | marijus <mario@localhost.localdomain> | 2013-12-14 09:57:57 +0100 |
commit | c3c7a068332ae08aea5eeb8eaf820e34c9cf210b (patch) | |
tree | 91548f100a940632833648211ccb9893d0ca1042 /include/photos.php | |
parent | ed5f725741455f9282a0dc38cd51b07e74b50ab1 (diff) | |
parent | a4624d29791af75fea7907caa4c8cf7a1cca90a0 (diff) | |
download | volse-hubzilla-c3c7a068332ae08aea5eeb8eaf820e34c9cf210b.tar.gz volse-hubzilla-c3c7a068332ae08aea5eeb8eaf820e34c9cf210b.tar.bz2 volse-hubzilla-c3c7a068332ae08aea5eeb8eaf820e34c9cf210b.zip |
Merge branch 'master' of https://github.com/friendica/red
Diffstat (limited to 'include/photos.php')
-rw-r--r-- | include/photos.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/photos.php b/include/photos.php index ea4b494e0..9828140b8 100644 --- a/include/photos.php +++ b/include/photos.php @@ -279,8 +279,16 @@ function photos_album_widget($channelx,$observer,$albums = null) { $o = ''; - if(! $albums) - $albums = photos_albums_list($channelx,$observer); + // If we weren't passed an album list, see if the photos module + // dropped one for us to find in $a->data['albums']. + // If all else fails, load it. + + if(! $albums) { + if(array_key_exists('albums', get_app()->data)) + $albums = get_app()->data['albums']; + else + $albums = photos_albums_list($channelx,$observer); + } if($albums) { $o = replace_macros(get_markup_template('photo_albums.tpl'),array( |