Changeset 16392 for extensions/BatchDownloader/include/download.inc.php
- Timestamp:
- Jul 6, 2012, 1:03:39 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/BatchDownloader/include/download.inc.php
r16379 r16392 15 15 $BatchDownloader = new BatchDownloader($_GET['set_id']); 16 16 17 if ( $BatchDownloader->getParam('status') != 'done')17 if ( isset($_GET['cancel']) ) 18 18 { 19 if (isset($_GET['zip'])) 20 { 21 $BatchDownloader->deleteLastArchive(); 22 $next_file = $BatchDownloader->createNextArchive(); 23 } 24 else 25 { 26 $BatchDownloader->getEstimatedArchiveNumber(); 27 } 19 $BatchDownloader->deleteLastArchive(); 20 $BatchDownloader->clear(); 21 pwg_query('DELETE FROM '.BATCH_DOWNLOAD_TSETS.' WHERE id = '.$_GET['set_id'].';'); 22 $_SESSION['page_infos'][] = l10n('Download set deleted'); 23 redirect('index.php'); 24 } 25 26 if ( isset($_GET['zip']) and $BatchDownloader->getParam('status') != 'done' and $_GET['zip'] > $BatchDownloader->getParam('last_zip') ) 27 { 28 $BatchDownloader->deleteLastArchive(); 29 $next_file = $BatchDownloader->createNextArchive(); 28 30 } 29 31 … … 33 35 { 34 36 $set['U_DOWNLOAD'] = BATCH_DOWNLOAD_PATH . 'download.php?set_id='.$_GET['set_id'].'&zip='.$_GET['zip']; 35 array_push($page['infos'], sprintf(l10n(' Archive #%d is downloading, if the download doesn\'t start automatically please <a href="%s">click here</a>'), $_GET['zip'], $set['U_DOWNLOAD']));37 array_push($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'])); 36 38 } 37 39 38 40 if ($BatchDownloader->getParam('nb_images') > $conf['batch_download']['max_elements']) 39 41 { 40 array_push($page['errors'], sprintf(42 $template->assign('elements_error', sprintf( 41 43 l10n('You choose to download %d pictures, but the system is limited to %d. You can edit the set, or the last %d pictures will not be downloaded.'), 42 44 $BatchDownloader->getParam('nb_images'), … … 44 46 $BatchDownloader->getParam('nb_images') - $conf['batch_download']['max_elements'] 45 47 )); 48 } 49 50 if ($BatchDownloader->getParam('status') == 'new') 51 { 52 $set['U_CANCEL'] = BATCH_DOWNLOAD_PUBLIC . 'init_zip&set_id='.$_GET['set_id'].'&cancel'; 46 53 } 47 54 … … 102 109 } 103 110 111 $template->assign('BATCH_DOWNLOAD_PATH', BATCH_DOWNLOAD_PATH); 112 104 113 105 114 function batch_download_thumbnails_list_prefilter($content, &$smarty)
Note: See TracChangeset
for help on using the changeset viewer.