diff options
author | zotlabs <mike@macgirvin.com> | 2017-03-15 20:56:12 -0700 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-03-29 11:50:52 +0200 |
commit | 6e101e458268c0f9b7bf461cea3c31c37b5e3791 (patch) | |
tree | 2a641a76607431a2661b0d3b6c46babbd34b6c0d /Zotlabs/Widget/Photo_albums.php | |
parent | f60309efa12be3b8d4f5b2c565ebdf7f051a987d (diff) | |
download | volse-hubzilla-6e101e458268c0f9b7bf461cea3c31c37b5e3791.tar.gz volse-hubzilla-6e101e458268c0f9b7bf461cea3c31c37b5e3791.tar.bz2 volse-hubzilla-6e101e458268c0f9b7bf461cea3c31c37b5e3791.zip |
widgets cont.
Diffstat (limited to 'Zotlabs/Widget/Photo_albums.php')
-rw-r--r-- | Zotlabs/Widget/Photo_albums.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Zotlabs/Widget/Photo_albums.php b/Zotlabs/Widget/Photo_albums.php new file mode 100644 index 000000000..2a746e492 --- /dev/null +++ b/Zotlabs/Widget/Photo_albums.php @@ -0,0 +1,25 @@ +<?php + +namespace Zotlabs\Widget; + +require_once('include/photos.php'); + +class Photo_albums { + + function widget($arr) { + + if(! \App::$profile['profile_uid']) + return ''; + + $channelx = channelx_by_n(\App::$profile['profile_uid']); + + if((! $channelx) || (! perm_is_allowed(\App::$profile['profile_uid'], get_observer_hash(), 'view_storage'))) + return ''; + + $sortkey = ((array_key_exists('sortkey',$arr)) ? $arr['sortkey'] : 'album'); + $direction = ((array_key_exists('direction',$arr)) ? $arr['direction'] : 'asc'); + + return photos_album_widget($channelx, \App::get_observer(),$sortkey,$direction); + } +} + |