Index: extensions/BatchDownloader/admin.php
===================================================================
--- extensions/BatchDownloader/admin.php	(revision 16681)
+++ extensions/BatchDownloader/admin.php	(revision 16689)
@@ -14,4 +14,9 @@
 $tabsheet->assign();
 
+if (!class_exists('ZipArchive'))
+{
+  array_push($page['errors'], l10n('Unable to find ZipArchive PHP extension, Batch Downloader can\'t work without this extension.'));
+}
+
 // include page
 include(BATCH_DOWNLOAD_PATH . 'admin/' . $page['tab'] . '.php');
Index: extensions/BatchDownloader/admin/config.php
===================================================================
--- extensions/BatchDownloader/admin/config.php	(revision 16681)
+++ extensions/BatchDownloader/admin/config.php	(revision 16689)
@@ -9,5 +9,4 @@
     'photo_size'      => $_POST['photo_size'],
     'archive_prefix'  => trim($_POST['archive_prefix']),
-    'archive_comment' => trim($_POST['archive_comment']),
     'archive_timeout' => intval($_POST['archive_timeout']),
     'max_elements'    => intval($_POST['max_elements']),
@@ -15,6 +14,8 @@
     'last_clean'      => $conf['batch_download']['last_clean'],
     );
+  $conf['batch_download_comment'] = trim($_POST['archive_comment']);
   
   conf_update_param('batch_download', serialize($conf['batch_download']));
+  conf_update_param('batch_download_comment', $conf['batch_download_comment']);
 }
 
@@ -43,5 +44,5 @@
 // max values
 $conf['batch_download']['max_elements_value'] = isset($conf['batch_download_max_elements']) ? $conf['batch_download_max_elements'] : 1000;
-$conf['batch_download']['max_size_value'] = isset($conf['batch_download_max_size']) ? $conf['batch_download_max_size'] : 1000;
+$conf['batch_download']['max_size_value'] = isset($conf['batch_download_max_size']) ? $conf['batch_download_max_size'] : 500;
 
 $template->assign(array(
@@ -50,4 +51,5 @@
   'sizes_options' => $sizes_options,
   'batch_download' => $conf['batch_download'],
+  'batch_download_comment' => stripslashes($conf['batch_download_comment']),
   ));
 
Index: extensions/BatchDownloader/admin/sets.php
===================================================================
--- extensions/BatchDownloader/admin/sets.php	(revision 16681)
+++ extensions/BatchDownloader/admin/sets.php	(revision 16689)
@@ -68,6 +68,6 @@
       'STATUS' => $set->getParam('status'),
       'LAST_ZIP' => $set->getParam('last_zip'),
-      'U_DELETE' => BATCH_DOWNLOAD_ADMIN . '-sets&amp;delete='.$set->getParam('set_id'),
-      'U_CANCEL' => BATCH_DOWNLOAD_ADMIN . '-sets&amp;cancel='.$set->getParam('set_id'),
+      'U_DELETE' => BATCH_DOWNLOAD_ADMIN . '-sets&amp;delete='.$set->getParam('id'),
+      'U_CANCEL' => BATCH_DOWNLOAD_ADMIN . '-sets&amp;cancel='.$set->getParam('id'),
     )
     ));
Index: extensions/BatchDownloader/admin/template/config.tpl
===================================================================
--- extensions/BatchDownloader/admin/template/config.tpl	(revision 16681)
+++ extensions/BatchDownloader/admin/template/config.tpl	(revision 16689)
@@ -110,6 +110,8 @@
       <label>
         <span class="property">{'Archive comment'|@translate} :</span><br>
-        <textarea name="archive_comment" rows="5" style="width:450px;">{$batch_download.archive_comment}</textarea>
+        <textarea name="archive_comment" rows="5" style="width:450px;">{$batch_download_comment}</textarea>
       </label>
+      <br>
+      <i>{'Warning: ZipArchive doesn\'t accept special characters like accentuated ones, angle quotes (») and non-latin alphabets.'|@translate}</i>
     </li>
   </ul>
Index: extensions/BatchDownloader/include/BatchDownloader.class.php
===================================================================
--- extensions/BatchDownloader/include/BatchDownloader.class.php	(revision 16681)
+++ extensions/BatchDownloader/include/BatchDownloader.class.php	(revision 16689)
@@ -20,6 +20,7 @@
     
     $this->conf = $conf['batch_download'];
+    $this->conf['archive_acomment'] = $conf['batch_download_comment'];
     $this->data = array(
-      'set_id' => 0,
+      'id' => 0,
       'user_id' => $user['id'],
       'date_creation' => '0000-00-00 00:00:00',
@@ -39,4 +40,5 @@
       $query = '
 SELECT
+    id,
     user_id,
     date_creation,
@@ -57,16 +59,8 @@
       if (pwg_db_num_rows($result))
       {
-        $this->data['set_id'] = $set_id;
-        list(
-          $this->data['user_id'],
-          $this->data['date_creation'],
-          $this->data['type'], 
-          $this->data['type_id'], 
-          $this->data['nb_zip'], 
-          $this->data['last_zip'], 
-          $this->data['nb_images'], 
-          $this->data['total_size'],
-          $this->data['status']
-          ) = pwg_db_fetch_row($result);
+        $this->data = array_merge(
+          $this->data,
+          pwg_db_fetch_assoc($result)
+          );
         
         // make sur all pictures of the set exist
@@ -84,5 +78,5 @@
     zip
   FROM '.BATCH_DOWNLOAD_TIMAGES.'
-  WHERE set_id = '.$this->data['set_id'].'
+  WHERE set_id = '.$this->data['id'].'
 ;';
         $this->images = simple_hash_from_query($query, 'image_id', 'zip');
@@ -129,5 +123,5 @@
 ;';
       pwg_query($query);
-      $this->data['set_id'] = pwg_db_insert_id();
+      $this->data['id'] = pwg_db_insert_id();
       
       $date = pwg_query('SELECT FROM_UNIXTIME(NOW());');
@@ -153,5 +147,5 @@
   {
     $this->data[$name] = $value;
-    pwg_query('UPDATE '.BATCH_DOWNLOAD_TSETS.' SET '.$name.' = "'.$value.'" WHERE id = '.$this->data['set_id'].';');
+    pwg_query('UPDATE '.BATCH_DOWNLOAD_TSETS.' SET '.$name.' = "'.$value.'" WHERE id = '.$this->data['id'].';');
   }
   
@@ -201,5 +195,5 @@
 DELETE FROM '.BATCH_DOWNLOAD_TIMAGES.'
   WHERE 
-    set_id = '.$this->data['set_id'].'
+    set_id = '.$this->data['id'].'
     AND image_id IN('.implode(',', $image_ids).')
 ;';
@@ -225,5 +219,5 @@
       
       $this->images[ $image_id ] = 0;
-      array_push($inserts, array('set_id'=>$this->data['set_id'], 'image_id'=>$image_id, 'zip'=>0));
+      array_push($inserts, array('set_id'=>$this->data['id'], 'image_id'=>$image_id, 'zip'=>0));
     }
     
@@ -246,5 +240,5 @@
     $query = '
 DELETE FROM '.BATCH_DOWNLOAD_TIMAGES.'
-  WHERE set_id = '.$this->data['set_id'].'
+  WHERE set_id = '.$this->data['id'].'
 ;';
     pwg_query($query);
@@ -348,5 +342,5 @@
       if (!empty($this->conf['archive_comment']))
       {
-        $comment.= "\n\n".$this->conf['archive_comment'];
+        $comment.= "\n\n".wordwrap(remove_accents($this->conf['archive_comment']), 60);
       }
       $zip->setArchiveComment($comment);
@@ -359,5 +353,5 @@
   SET zip = '.$this->data['last_zip'].'
   WHERE
-    set_id = '.$this->data['set_id'].'
+    set_id = '.$this->data['id'].'
     AND image_id IN('.implode(',', $images_added).')
 ;';
@@ -442,5 +436,5 @@
       else if ($i == $this->data['last_zip']+1)
       {
-          $out.= '<a href="'.add_url_params($url, array('set_id'=>$this->data['set_id'],'zip'=>$i)).'" rel="nofollow" style="font-weight:bold;"' 
+          $out.= '<a href="'.add_url_params($url, array('set_id'=>$this->data['id'],'zip'=>$i)).'" rel="nofollow" style="font-weight:bold;"' 
             .($i!=1 ? 'onClick="return confirm(\'Starting download Archive #'.$i.' will destroy Archive #'.($i-1).', be sure you finish the download. Continue ?\');"' : null).
             '><img src="'.BATCH_DOWNLOAD_PATH.'template/drive_go.png"> Archive #'.$i.' (ready)</a>';
@@ -477,5 +471,5 @@
           get_username($this->data['user_id']) .'_'. 
           $this->data['type'] .'-'. $this->data['type_id'] .'_'.
-          $this->data['user_id'] . $this->data['set_id'] .
+          $this->data['user_id'] . $this->data['id'] .
           ($this->data['nb_zip']!=1 ? '_part'. $i : null).
           '.zip';
Index: extensions/BatchDownloader/include/events.inc.php
===================================================================
--- extensions/BatchDownloader/include/events.inc.php	(revision 16681)
+++ extensions/BatchDownloader/include/events.inc.php	(revision 16689)
@@ -81,5 +81,5 @@
         $BatchDownloader->createNextArchive(true); // make sure we have only one zip, even if 'max_size' is exceeded
         
-        $u_download = BATCH_DOWNLOAD_PATH . 'download.php?set_id='.$BatchDownloader->getParam('set_id').'&amp;zip=1';
+        $u_download = BATCH_DOWNLOAD_PATH . 'download.php?set_id='.$BatchDownloader->getParam('id').'&amp;zip=1';
         
         $null = null;
@@ -91,5 +91,5 @@
       else
       {
-        redirect(BATCH_DOWNLOAD_PUBLIC . 'init_zip&amp;set_id='.$BatchDownloader->getParam('set_id'));
+        redirect(BATCH_DOWNLOAD_PUBLIC . 'init_zip&amp;set_id='.$BatchDownloader->getParam('id'));
       }
     }
@@ -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">
-			<span class="pwg-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>
+  $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'])).'\');">
+			<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>';
   $template->concat('PLUGIN_INDEX_ACTIONS', $button);
@@ -163,5 +164,5 @@
       
       array_push($data, array(
-        'URL' => BATCH_DOWNLOAD_PUBLIC . 'init_zip&amp;set_id='.$BatchDownloader->getParam('set_id'),
+        'URL' => BATCH_DOWNLOAD_PUBLIC . 'init_zip&amp;set_id='.$BatchDownloader->getParam('id'),
         'TITLE' => str_replace('"', "'", strip_tags($set['COMMENT'])),
         'NAME' => $set['sNAME'],
Index: extensions/BatchDownloader/language/en_UK/plugin.lang.php
===================================================================
--- extensions/BatchDownloader/language/en_UK/plugin.lang.php	(revision 16681)
+++ extensions/BatchDownloader/language/en_UK/plugin.lang.php	(revision 16689)
@@ -39,4 +39,8 @@
 $lang['Cancel this download'] = 'Cancel this download';
 $lang['Return to download page'] = 'Return to download page';
+$lang['Warning: ZipArchive doesn\'t accept special characters like accentuated ones, angle quotes (») and non-latin alphabets.'] = 'Warning: ZipArchive doesn\'t accept special characters like accentuated ones, angle quotes (») and non-latin alphabets.';
+$lang['Unable to find ZipArchive PHP extension, Batch Downloader can\'t work without this extension.'] = 'Unable to find ZipArchive PHP extension, Batch Downloader can\'t work without this extension.';
+$lang['Remove from download set'] = 'Remove from download set';
+$lang['Confirm the download of %d pictures?'] = 'Confirm the download of %d pictures?';
 
 ?>
Index: extensions/BatchDownloader/language/fr_FR/plugin.lang.php
===================================================================
--- extensions/BatchDownloader/language/fr_FR/plugin.lang.php	(revision 16681)
+++ extensions/BatchDownloader/language/fr_FR/plugin.lang.php	(revision 16689)
@@ -39,4 +39,8 @@
 $lang['Cancel this download'] = 'Annuler ce téléchargement';
 $lang['Return to download page'] = 'Retourner à la page de téléchargement';
+$lang['Warning: ZipArchive doesn\'t accept special characters like accentuated ones, angle quotes (») and non-latin alphabets.'] = 'Attention: ZipArchive n\'accepte pas les caractères spéciaux comme les caractères accentués, les guillemets (») et les alphabets non-latin.';
+$lang['Unable to find ZipArchive PHP extension, Batch Downloader can\'t work without this extension.'] = 'Impossible de trouver l\'extension PHP ZipArchive, Batch Downloader ne peut fonctionner sans cette extension';
+$lang['Remove from download set'] = 'Supprimer du lot';
+$lang['Confirm the download of %d pictures?'] = 'Confirmer le téléchargementde %d photos ?';
 
 ?>
Index: extensions/BatchDownloader/maintain.inc.php
===================================================================
--- extensions/BatchDownloader/maintain.inc.php	(revision 16681)
+++ extensions/BatchDownloader/maintain.inc.php	(revision 16689)
@@ -9,5 +9,4 @@
     'photo_size'      => 'original',
     'archive_prefix'  => 'piwigo',
-    'archive_comment' => null,
     'archive_timeout' => 48, /* hours */
     'max_elements'    => 500,
@@ -49,4 +48,5 @@
 
   conf_update_param('batch_download', batch_download_default_config);
+  conf_update_param('batch_download_comment', null);
   
   mkdir($conf['data_location'] . 'download_archives/', 0755);
@@ -57,7 +57,10 @@
   global $conf;
 
-  if (empty($conf['batch_download']))
+  if (empty($conf['batch_download_comment']))
   {
-    conf_update_param('batch_download', batch_download_default_config);
+    $new_conf = unserialize($conf['batch_download']);
+    unset($new_conf['archive_comment']);
+    conf_update_param('batch_download', serialize($new_conf));
+    conf_update_param('batch_download_comment', null);
   }
   
Index: extensions/BatchDownloader/template/thumbnails_css_js.tpl
===================================================================
--- extensions/BatchDownloader/template/thumbnails_css_js.tpl	(revision 16681)
+++ extensions/BatchDownloader/template/thumbnails_css_js.tpl	(revision 16689)
@@ -1,5 +1,5 @@
 {html_style}
 .thumbnails  .wrap1 {ldelim} position:relative; }
-.removeSet {ldelim} width:100%;height:16px;display:none;position:absolute;top:0;background:rgba(0,0,0,0.8);padding:2px;border-radius:2px;font-size:0.8em;z-index:100;color:#eee;white-space:nowrap; }
+.wrap1 .removeSet {ldelim} width:100%;height:16px;display:none;position:absolute;top:0;background:rgba(0,0,0,0.8);padding:2px;border-radius:2px;font-size:10px;z-index:100;color:#eee;white-space:nowrap; }
 .wrap1:hover .removeSet {ldelim} display:block; 
 {/html_style}
Index: extensions/BatchDownloader/template/view.tpl
===================================================================
--- extensions/BatchDownloader/template/view.tpl	(revision 16681)
+++ extensions/BatchDownloader/template/view.tpl	(revision 16689)
@@ -22,4 +22,6 @@
   {assign var="nb_images" value='<span class="nbImagesSet">'|@cat:$set.NB_IMAGES|@cat:'</span>'}
   {'%d photos'|@translate|replace:'%d':'%s'|sprintf:$nb_images}
+  <br>
+  <b><a href="{$U_INIT_ZIP}" rel="nofollow">{'Return to download page'|@translate} →</a></b>
 </fieldset>
 
@@ -34,6 +36,4 @@
 
 {if !empty($navbar)}{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
-
-<p style="text-align:center;font-weight:bold;margin:20px;"><a href="{$U_INIT_ZIP}" rel="nofollow">{'Return to download page'|@translate}</a></p>
 {/if}
 
