diff --git a/admin/maintenance.php b/admin/maintenance.php index 4af358a3a..34c820152 100644 --- a/admin/maintenance.php +++ b/admin/maintenance.php @@ -49,6 +49,10 @@ $maint_actions = array( 'icon' => 'icon-info-circled-1', 'label' => l10n('Update photos information'), ), + 'empty_lounge' => array( + 'icon' => 'icon-thumbs-up', + 'label' => l10n('Empty lounge'), + ), 'delete_orphan_tags' => array( 'icon' => 'icon-tags', 'label' => l10n('Delete orphan tags'), diff --git a/admin/maintenance_actions.php b/admin/maintenance_actions.php index ce4c6b842..ea07c5564 100644 --- a/admin/maintenance_actions.php +++ b/admin/maintenance_actions.php @@ -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); // +-----------------------------------------------------------------------+ diff --git a/admin/themes/default/template/maintenance_actions.tpl b/admin/themes/default/template/maintenance_actions.tpl index 63c070296..64d81002a 100644 --- a/admin/themes/default/template/maintenance_actions.tpl +++ b/admin/themes/default/template/maintenance_actions.tpl @@ -132,6 +132,9 @@ $(".delete-size-check").click( function () { {$maint_actions['images']['label']} {$maint_actions['database']['label']} {$maint_actions['c13y']['label']} +{if (isset($U_EMPTY_LOUNGE))} + {$maint_actions['empty_lounge']['label']}{$LOUNGE_COUNTER} +{/if}
diff --git a/language/en_UK/admin.lang.php b/language/en_UK/admin.lang.php index 4a7e138c8..b5e93b9ee 100644 --- a/language/en_UK/admin.lang.php +++ b/language/en_UK/admin.lang.php @@ -1417,5 +1417,8 @@ $lang['The comment has been validated.'] = 'The comment has been validated.'; $lang['The comments have been validated.'] = 'The comments have been validated.'; $lang['Are you sure you want to delete "%d" comments?'] = 'Are you sure you want to delete "%d" comments?'; $lang['If a photo in this album has the same filename, update the file without changing the photo\'s properties'] = 'If a photo in this album has the same filename, update the file without changing the photo\'s properties'; +$lang['Empty lounge'] = 'Empty lounge'; +$lang['There is currently %d photos in the lounge (upload buffer)'] = 'There is currently %d photos in the lounge (upload buffer)'; +$lang['%d photos were moved from the upload lounge to their albums'] = '%d photos were moved from the upload lounge to their albums'; // Leave this line empty \ No newline at end of file diff --git a/language/fr_FR/admin.lang.php b/language/fr_FR/admin.lang.php index d0bf223e8..df4a33540 100644 --- a/language/fr_FR/admin.lang.php +++ b/language/fr_FR/admin.lang.php @@ -1419,4 +1419,7 @@ $lang['The comment has been validated.'] = 'Le commentaire a été validé.'; $lang['The comments have been validated.'] = 'Les commentaires ont été validés.'; $lang['Are you sure you want to delete "%d" comments?'] = 'Êtes-vous sûr de vouloir supprimer "%d" commentaires ?'; $lang['If a photo in this album has the same filename, update the file without changing the photo\'s properties'] = 'Si une photo de cet album a le même nom de fichier, mettre à jour le fichier sans changer les propriétés de la photo'; +$lang['Empty lounge'] = 'Vider le lounge'; +$lang['There is currently %d photos in the lounge (upload buffer)'] = 'Il y a actuellement %d photos dans le lounge (salle d\'attente des transferts)'; +$lang['%d photos were moved from the upload lounge to their albums'] = '%d photos ont été déplacées du lounge vers leurs albums respectifs'; // Leave this line empty