aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Widget/Photo_albums.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Widget/Photo_albums.php')
-rw-r--r--Zotlabs/Widget/Photo_albums.php25
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..6df8ddf3c
--- /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'] : 'display_path');
+ $direction = ((array_key_exists('direction',$arr)) ? $arr['direction'] : 'asc');
+
+ return photos_album_widget($channelx, \App::get_observer(),$sortkey,$direction);
+ }
+}
+