automatically create a default photo album when a user's photos page is visited if none exist.
This commit is contained in:
parent
d61f88b979
commit
89d8c0c6f2
@ -85,6 +85,9 @@ class PhotosAction extends Action
|
||||
//TODO choice of available albums by user.
|
||||
//Currently based on fact that each user can only have one album.
|
||||
$album = GNUSocialPhotoAlbum::staticGet('profile_id', $this->user->id);
|
||||
if (!$album) {
|
||||
$album = GNUSocialPhotoAlbum::newAlbum($this->user->id, 'Default');
|
||||
}
|
||||
$photos = GNUsocialPhoto::getGalleryPage($page, $album->album_id, 9);
|
||||
|
||||
if ($page > 1) {
|
||||
|
Loading…
Reference in New Issue
Block a user