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:
plegall
2021-06-11 16:35:29 +02:00
parent 4aa7a7b9bf
commit ac0d1a5b47
13 changed files with 307 additions and 7 deletions
+8
View File
@@ -475,6 +475,11 @@ SELECT image_id
*/
function get_computed_categories(&$userdata, $filter_days=null)
{
global $logger;
$start_time = get_moment();
$logger->debug(__FUNCTION__.' starts now');
$query = 'SELECT c.id AS cat_id, id_uppercat';
$query.= ', global_rank';
// Count by date_available to avoid count null
@@ -569,6 +574,9 @@ FROM '.CATEGORIES_TABLE.' as c
}
}
}
$logger->debug(__FUNCTION__.' ends now in '.get_elapsed_time($start_time, get_moment()));
return $cats;
}