Changeset 23383 for extensions/BatchDownloader/include/download.inc.php
- Timestamp:
- Jun 20, 2013, 2:10:51 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/BatchDownloader/include/download.inc.php
r23323 r23383 20 20 if ( isset($_GET['cancel']) ) 21 21 { 22 $BatchDownloader->delete LastArchive();22 $BatchDownloader->deleteArchives(); 23 23 $BatchDownloader->clearImages(); 24 24 pwg_query('DELETE FROM '.BATCH_DOWNLOAD_TSETS.' WHERE id = '.$_GET['set_id'].';'); … … 28 28 29 29 // 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' ) 31 31 { 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 } 34 46 } 35 47 … … 74 86 if (isset($next_file)) 75 87 { 76 $set['U_DOWNLOAD'] = get_root_url().BATCH_DOWNLOAD_PATH . 'download.php?set_id='.$_GET['set_id'].'& amp;zip='.$_GET['zip'];88 $set['U_DOWNLOAD'] = get_root_url().BATCH_DOWNLOAD_PATH . 'download.php?set_id='.$_GET['set_id'].'&zip='.$_GET['zip']; 77 89 $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']); 78 90 } … … 85 97 86 98 // cancel link 87 if ($BatchDownloader->getParam(' status') != 'done')99 if ($BatchDownloader->getParam('last_zip') != $BatchDownloader->getParam('nb_zip')) 88 100 { 89 101 $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.