Ignore:
Timestamp:
Dec 12, 2013, 2:41:53 PM (10 years ago)
Author:
mistic100
Message:

update for Piwigo 2.6 + code cleaning + fix unable to cancel set during generation

File:
1 edited

Legend:

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

    r25931 r25932  
    99{
    1010  global $page, $conf;
    11  
     11
    1212  switch ($page['section'])
    1313  {
     
    1616      {
    1717        $batch_type = 'calendar';
    18         $batch_id = add_well_known_params_in_url('', 
    19           array_intersect_key($page, 
     18        $batch_id = add_well_known_params_in_url('',
     19          array_intersect_key($page,
    2020            array(
    2121              'chronology_field'=>0,
     
    6262      return false;
    6363  }
    64  
     64
    6565  $set = array(
    6666    'type' => $batch_type,
     
    6969    'items' => $page['items'],
    7070    );
    71    
     71
    7272  // check size
    7373  if (!$conf['batch_download']['multisize'])
     
    8787      $avail_sizes[] = 'original';
    8888    }
    89    
     89
    9090    if (!in_array($set['size'], $avail_sizes))
    9191    {
     
    104104{
    105105  global $user, $conf;
    106  
     106
    107107  if (is_a_guest()) return false;
    108108  if (is_admin()) return true;
    109  
     109
    110110  if ($user['level'] < $conf['batch_download']['level']) return false;
    111  
     111
    112112  if (!empty($conf['batch_download']['groups']))
    113113  {
     
    119119;';
    120120    $result = pwg_query($query);
    121    
     121
    122122    if (!pwg_db_num_rows($result)) return false;
    123123  }
    124  
     124
    125125  return true;
    126126}
     
    167167  }
    168168}
    169 
    170 ?>
Note: See TracChangeset for help on using the changeset viewer.