mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-13 13:21:43 +02:00
fixes #1419 add photos in a lounge as a temporary space
* at the end of the upload of after a maximum duration, move the photos from the lounge to their actual categories. * do not invalidate user cache when photos are added in the lounge, thus avoiding to rebuild cache on every photo uploaded * the lounge system activates itself only beyond 50k (by default) photo
This commit is contained in:
@@ -405,8 +405,10 @@ SELECT id, name, permalink, uppercats, global_rank, commentable
|
||||
}
|
||||
usort($related_categories, 'global_rank_compare');
|
||||
|
||||
if (empty($related_categories))
|
||||
if (empty($related_categories) and !is_admin())
|
||||
{
|
||||
// photo might be in the lounge? or simply orphan. A standard user should not get
|
||||
// info. An admin should still be able to get info.
|
||||
return new PwgError(401, 'Access denied');
|
||||
}
|
||||
|
||||
@@ -2094,6 +2096,21 @@ function ws_images_checkUpload($params, $service)
|
||||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* API method
|
||||
* Empties the lounge, where photos may wait before taking off.
|
||||
* @since 12
|
||||
* @param mixed[] $params
|
||||
*/
|
||||
function ws_images_emptyLounge($params, $service)
|
||||
{
|
||||
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
|
||||
|
||||
$ret = array('count' => empty_lounge());
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* API method
|
||||
* add md5sum at photos, by block. Returns how md5sum were added and how many are remaining.
|
||||
|
||||
Reference in New Issue
Block a user