Ignore:
Timestamp:
Mar 9, 2013, 11:06:35 PM (11 years ago)
Author:
mistic100
Message:

add option too allow/disallow download of categories/collections/specials

File:
1 edited

Legend:

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

    r21206 r21422  
    5858  global $page, $template, $user, $conf;
    5959 
     60  // check accesses
    6061  if ( !count($page['items']) or !isset($page['section']) ) return;
    6162 
    6263  if (check_download_access() === false) return;
     64 
     65  switch ($page['section'])
     66  {
     67  case 'categories':
     68    if (!isset($page['category'])) return; // don't download the full gallery in flat mode !
     69   
     70    if (!in_array('categories', $conf['batch_download']['what'])) return;
     71    break;
     72   
     73  case 'collections':
     74    if (!in_array('collections', $conf['batch_download']['what'])) return;
     75    break;
     76   
     77  default:
     78    if (!in_array('specials', $conf['batch_download']['what'])) return;
     79  }
     80 
    6381 
    6482  // download the set
Note: See TracChangeset for help on using the changeset viewer.