mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-06 09:52:29 +02:00
fixes #2361 explicit action to empty lounge
This commit is contained in:
@@ -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);
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
Reference in New Issue
Block a user