blob: 2ce916048b9e756c67fc59fccca295345bb1e4bf (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
<?php
/**
* * Name: Photo albums
* * Description: Displays a menu with links to existing photo albums
* * Requires: photos
*/
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);
}
}
|