Ignore:
Timestamp:
Jun 20, 2013, 2:10:51 AM (11 years ago)
Author:
mistic100
Message:

new parameters on config screen "photo_size", "one_archive", "force_pclzip", "direct"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/BatchDownloader/include/download.inc.php

    r23323 r23383  
    2020      if ( isset($_GET['cancel']) )
    2121      {
    22         $BatchDownloader->deleteLastArchive();
     22        $BatchDownloader->deleteArchives();
    2323        $BatchDownloader->clearImages();
    2424        pwg_query('DELETE FROM '.BATCH_DOWNLOAD_TSETS.' WHERE id = '.$_GET['set_id'].';');
     
    2828     
    2929      // prepare next zip
    30       if ( isset($_GET['zip']) and $BatchDownloader->getParam('status') != 'new' and $BatchDownloader->getParam('status') != 'done' and $_GET['zip'] > $BatchDownloader->getParam('last_zip') )
     30      if ( isset($_GET['zip']) and $BatchDownloader->getParam('status') != 'new' and $BatchDownloader->getParam('status') != 'done' )
    3131      {
    32         $BatchDownloader->deleteLastArchive();
    33         $next_file = $BatchDownloader->createNextArchive();
     32        if ($_GET['zip'] > $BatchDownloader->getParam('last_zip'))
     33        {
     34          if ($conf['batch_download']['one_archive']) $BatchDownloader->deleteArchives();
     35          $BatchDownloader->createNextArchive();
     36        }
     37       
     38        if ($conf['batch_download']['one_archive'])
     39        {
     40          $next_file = $BatchDownloader->getParam('last_zip')+1;
     41        }
     42        else
     43        {
     44          $next_file = $_GET['zip'];
     45        }
    3446      }
    3547     
     
    7486      if (isset($next_file))
    7587      {
    76         $set['U_DOWNLOAD'] = get_root_url().BATCH_DOWNLOAD_PATH . 'download.php?set_id='.$_GET['set_id'].'&zip='.$_GET['zip'];
     88        $set['U_DOWNLOAD'] = get_root_url().BATCH_DOWNLOAD_PATH . 'download.php?set_id='.$_GET['set_id'].'&zip='.$_GET['zip'];
    7789        $page['infos'][] = sprintf(l10n('The archive is downloading, if the download doesn\'t start automatically please <a href="%s">click here</a>'), $set['U_DOWNLOAD']);
    7890      }
     
    8597     
    8698      // cancel link
    87       if ($BatchDownloader->getParam('status') != 'done')
     99      if ($BatchDownloader->getParam('last_zip') != $BatchDownloader->getParam('nb_zip'))
    88100      {
    89101        $set['U_CANCEL'] = add_url_params(BATCH_DOWNLOAD_PUBLIC . 'init_zip', array('set_id'=>$_GET['set_id'], 'cancel'=>'true'));
Note: See TracChangeset for help on using the changeset viewer.