function widget_photo_albums($arr) { $a = get_app(); if (!$a->profile['profile_uid']) { return ''; } $channelx = channelx_by_n($a->profile['profile_uid']); if (!$channelx || !perm_is_allowed($a->profile['profile_uid'], get_observer_hash(), 'view_photos')) { return ''; } return photos_album_widget($channelx, $a->get_observer()); }
function widget_photo_albums($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 ''; } require_once 'include/photos.php'; $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); }