Changeset 17318


Ignore:
Timestamp:
Aug 2, 2012, 8:11:29 PM (12 years ago)
Author:
mistic100
Message:

warnings on some pages

File:
1 edited

Legend:

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

    r17177 r17318  
    1919  global $tokens, $page, $conf;
    2020 
    21   define('BATCH_DOWNLOAD_PUBLIC',  make_index_url(array('section' => 'download')) . '/');
     21  define('BATCH_DOWNLOAD_PUBLIC', make_index_url(array('section' => 'download')) . '/');
    2222 
    2323  if ($tokens[0] == 'download')
     
    151151  $block = $menu->get_block('mbBatchDownloader');
    152152 
     153  if (!defined('BATCH_DOWNLOAD_PUBLIC')) define('BATCH_DOWNLOAD_PUBLIC', make_index_url(array('section' => 'download')) . '/');
     154 
    153155  if ($block != null)
    154156  {
     
    218220  // remove old archives
    219221  $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      }
    225231    }
    226232  }
Note: See TracChangeset for help on using the changeset viewer.