Ignore:
Timestamp:
Jun 20, 2013, 2:10:51 AM (11 years ago)
Author:
mistic100
Message:

new parameters on config screen "photo_size", "one_archive", "force_pclzip", "direct"

File:
1 edited

Legend:

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

    r23290 r23383  
    1313      'level'           => 0,
    1414      'what'            => array('categories','specials','collections'),
    15       'photo_size'      => 'original', // not used
     15      'photo_size'      => 'original',
    1616      'archive_prefix'  => 'piwigo',
    1717      'archive_timeout' => 48, /* hours */
     
    1919      'max_size'        => 100, /* MB */
    2020      'last_clean'      => time(),
     21      'one_archive'     => false,
     22      'force_pclzip'    => false,
     23      'direct'          => false,
    2124      );
    2225     
     
    3134    $new_conf = is_string($conf['batch_download']) ? unserialize($conf['batch_download']) : $conf['batch_download'];
    3235   
    33     if (empty($new_conf['what']))
     36    if (!isset($new_conf['what']))
    3437    {
    3538      $new_conf['what'] = array('categories','specials','collections');
    36      
    37       $conf['batch_download'] = serialize($new_conf);
    38       conf_update_param('batch_download', $conf['batch_download']);
    3939    }
     40    if (!isset($new_conf['one_archive']))
     41    {
     42      $new_conf['one_archive'] = false;
     43      $new_conf['force_pclzip'] = isset($conf['batch_download_force_pclzip']) && $conf['batch_download_force_pclzip'];
     44      $new_conf['direct'] = isset($conf['batch_download_direct']) && $conf['batch_download_direct'];
     45    }
     46   
     47    $conf['batch_download'] = serialize($new_conf);
     48    conf_update_param('batch_download', $conf['batch_download']);
    4049  }
    4150
Note: See TracChangeset for help on using the changeset viewer.