'recent photos' query was buggered, also fix issue #163 by adding configurable sort order to the album widget - default is album name ascending

This commit is contained in:
redmatrix
2016-06-07 16:23:14 -07:00
parent 037cd74e8e
commit a50e555515
3 changed files with 21 additions and 25 deletions

View File

@@ -799,8 +799,10 @@ function widget_photo_albums($arr) {
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());
return photos_album_widget($channelx, App::get_observer(),$sortkey,$direction);
}