fixes #2361 explicit action to empty lounge

This commit is contained in:
plegall
2025-09-19 16:48:17 +02:00
parent 1be0527523
commit ad88ed9d5f
5 changed files with 36 additions and 0 deletions
+23
View File
@@ -159,6 +159,12 @@ DELETE
$page['infos'][] = sprintf('%s : %s', l10n('Reinitialize check integrity'), l10n('action successfully performed.'));
break;
}
case 'empty_lounge':
{
$rows = empty_lounge();
$page['infos'][] = sprintf('%d photos were moved from the upload lounge to their albums', count($rows));
break;
}
case 'search' :
{
$query = '
@@ -362,6 +368,23 @@ else
);
}
$query = '
SELECT
COUNT(*)
FROM '.LOUNGE_TABLE.'
;';
list($nb_lounge) = pwg_db_fetch_row(pwg_query($query));
if ($nb_lounge > 0)
{
$template->assign(
array(
'U_EMPTY_LOUNGE' => sprintf($url_format, 'empty_lounge'),
'LOUNGE_COUNTER' => $nb_lounge,
)
);
}
$template->assign('isWebmaster', (is_webmaster()) ? 1 : 0);
// +-----------------------------------------------------------------------+