Index: /extensions/BatchDownloader/admin/sets.php
===================================================================
--- /extensions/BatchDownloader/admin/sets.php	(revision 16696)
+++ /extensions/BatchDownloader/admin/sets.php	(revision 16697)
@@ -17,4 +17,17 @@
   $BatchDownloader->deleteLastArchive();
   $BatchDownloader->clearImages();
+}
+if (isset($_POST['delete_done']))
+{
+  $query = '
+DELETE s, i
+  FROM '.BATCH_DOWNLOAD_TSETS.' AS s
+    LEFT JOIN '.BATCH_DOWNLOAD_TIMAGES.' AS i
+    ON i.set_id = s.id
+  WHERE
+    status = "done" AND
+    date_creation < DATE_SUB(NOW(), INTERVAL 1 HOUR)
+;';
+  pwg_query($query);
 }
 
@@ -62,4 +75,5 @@
 {
   $set = new BatchDownloader($set_id);
+  
   $template->append('sets', array_merge(
     $set->getSetInfo(),
Index: /extensions/BatchDownloader/admin/template/config.tpl
===================================================================
--- /extensions/BatchDownloader/admin/template/config.tpl	(revision 16696)
+++ /extensions/BatchDownloader/admin/template/config.tpl	(revision 16697)
@@ -90,5 +90,5 @@
       <label>
         <span class="property">{'Maximum number of photos per download set'|@translate}</span>
-        <div id="max_elements""></div>
+        <div id="max_elements"></div>
         <input type="text" name="max_elements" value="{$batch_download.max_elements}" size="5">
       </label>
Index: /extensions/BatchDownloader/admin/template/sets.tpl
===================================================================
--- /extensions/BatchDownloader/admin/template/sets.tpl	(revision 16696)
+++ /extensions/BatchDownloader/admin/template/sets.tpl	(revision 16697)
@@ -64,6 +64,6 @@
     <td>{$set.NB_ARCHIVES}</td>
     <td>
-      {$set.STATUS}
-      {if $set.STATUS == 'download'}({$set.LAST_ZIP}/{$set.NB_ARCHIVES}){/if}
+      {$set.STATUS|@translate}
+      {if $set.STATUS == 'download'}<i style="font-size:0.8em;">({$set.LAST_ZIP}/{$set.NB_ARCHIVES})</i>{/if}
     </td>
     <td style="padding-left:25px;">
@@ -80,2 +80,7 @@
   {/if}
 </table>
+
+<form action="{$F_FILTER_ACTION}" method="post">
+<p><label><input type="checkbox" name="delete_done" value="1"> {'Remove all finished downloads'|@translate}</label>
+<input type="submit" value="{'Submit'|@translate}"></p>
+</form>
Index: /extensions/BatchDownloader/admin/template/style.css
===================================================================
--- /extensions/BatchDownloader/admin/template/style.css	(revision 16696)
+++ /extensions/BatchDownloader/admin/template/style.css	(revision 16697)
@@ -44,5 +44,5 @@
 }
 .table2 .status {
-  width:80px;
+  width:120px;
 }
 
Index: /extensions/BatchDownloader/include/BatchDownloader.class.php
===================================================================
--- /extensions/BatchDownloader/include/BatchDownloader.class.php	(revision 16696)
+++ /extensions/BatchDownloader/include/BatchDownloader.class.php	(revision 16697)
@@ -607,4 +607,5 @@
         try
         {
+          if (!class_exists('UserCollection')) throw new Exception();
           $UserCollection = new UserCollection($this->data['type_id']);
           $set['NAME'] = l10n('Collection').': <a href="'.USER_COLLEC_PUBLIC.'view/'.$UserCollection->getParam('id').'">'.$UserCollection->getParam('name').'</a>';
Index: /extensions/BatchDownloader/include/events.inc.php
===================================================================
--- /extensions/BatchDownloader/include/events.inc.php	(revision 16696)
+++ /extensions/BatchDownloader/include/events.inc.php	(revision 16697)
@@ -106,6 +106,7 @@
   
   // toolbar button
-  $button = '<li><a href="'. $url .'&amp;action=advdown_set" title="'.l10n('Download all pictures of this selection').'" class="pwg-state-default pwg-button" rel="nofollow"
-    onClick="return confirm(\''.sprintf(l10n('Confirm the download of %d pictures?'), count($page['items'])).'\');">
+  $button = '<script type="text/javascript">var batchdown_count = '.count($page['items']).'; var batchdown_string = "'.l10n('Confirm the download of %d pictures?').'";</script>
+    <li><a href="'. $url .'&amp;action=advdown_set" title="'.l10n('Download all pictures of this selection').'" class="pwg-state-default pwg-button" rel="nofollow"
+    onClick="return confirm(batchdown_string.replace(\'%d\', batchdown_count));">
 			<span class="pwg-icon batch-downloader-icon" style="background:url(\'' . BATCH_DOWNLOAD_PATH . 'template/zip.png\') center center no-repeat;">&nbsp;</span><span class="pwg-button-text">'.l10n('Batch Downloader').'</span>
 		</a></li>';
Index: /extensions/BatchDownloader/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/BatchDownloader/language/en_UK/plugin.lang.php	(revision 16696)
+++ /extensions/BatchDownloader/language/en_UK/plugin.lang.php	(revision 16697)
@@ -43,4 +43,6 @@
 $lang['Remove from download set'] = 'Remove from download set';
 $lang['Confirm the download of %d pictures?'] = 'Confirm the download of %d pictures?';
+$lang['Remove all finished downloads'] = 'Remove all finished downloads';
+$lang['hours'] = 'hours';
 
 ?>
Index: /extensions/BatchDownloader/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/BatchDownloader/language/fr_FR/plugin.lang.php	(revision 16696)
+++ /extensions/BatchDownloader/language/fr_FR/plugin.lang.php	(revision 16697)
@@ -23,5 +23,5 @@
 $lang['Archives'] = 'Archives';
 $lang['Maximum photo size'] = 'Taille maximale des photo';
-$lang['Delete unterminated downloads after'] = 'Supprimer les téléchargements après';
+$lang['Delete downloads after'] = 'Supprimer les téléchargements après';
 $lang['Maximum number of photos per download set'] = 'Nombre maximal de photos par lot';
 $lang['Maximum size of each archive (in Megabytes)'] = 'Taille maximale de chaque archive (en Megaoctets)';
@@ -43,4 +43,6 @@
 $lang['Remove from download set'] = 'Supprimer du lot';
 $lang['Confirm the download of %d pictures?'] = 'Confirmer le téléchargementde %d photos ?';
+$lang['Remove all finished downloads'] = 'Supprimer tous les téléchargements terminés';
+$lang['hours'] = 'heures';
 
 ?>
