Changeset 17318
- Timestamp:
- Aug 2, 2012, 8:11:29 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/BatchDownloader/include/events.inc.php
r17177 r17318 19 19 global $tokens, $page, $conf; 20 20 21 define('BATCH_DOWNLOAD_PUBLIC', 21 define('BATCH_DOWNLOAD_PUBLIC', make_index_url(array('section' => 'download')) . '/'); 22 22 23 23 if ($tokens[0] == 'download') … … 151 151 $block = $menu->get_block('mbBatchDownloader'); 152 152 153 if (!defined('BATCH_DOWNLOAD_PUBLIC')) define('BATCH_DOWNLOAD_PUBLIC', make_index_url(array('section' => 'download')) . '/'); 154 153 155 if ($block != null) 154 156 { … … 218 220 // remove old archives 219 221 $zips = glob(BATCH_DOWNLOAD_LOCAL . 'u-*/*.zip'); 220 foreach ($zips as $zip) 221 { 222 if (filemtime($zip) < time()-$conf['batch_download']['archive_timeout']*3600) 223 { 224 unlink($zip); 222 223 if (is_array($zips)) 224 { 225 foreach ($zips as $zip) 226 { 227 if (filemtime($zip) < time()-$conf['batch_download']['archive_timeout']*3600) 228 { 229 unlink($zip); 230 } 225 231 } 226 232 }
Note: See TracChangeset
for help on using the changeset viewer.