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

allow to configure only one downloadable size

File:
1 edited

Legend:

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

    r23771 r25931  
    145145    ));
    146146 
    147   foreach (ImageStdParams::get_defined_type_map() as $params)
    148   {
    149     $template->append(
    150       'BATCH_DOWNLOAD_SIZES',
    151       array(
    152         'TYPE' => $params->type,
    153         'DISPLAY' => l10n($params->type),
    154         'SIZE' => $params->sizing->ideal_size[0].' x '.$params->sizing->ideal_size[1],
    155         )
    156       );
    157       if ($params->type == $conf['batch_download']['photo_size']) break;
    158   }
    159   if ($conf['batch_download']['photo_size'] == 'original')
    160   {
    161     $template->append(
    162       'BATCH_DOWNLOAD_SIZES',
    163       array(
    164         'TYPE' => 'original',
    165         'DISPLAY' => l10n('Original'),
    166         'SIZE' => null,
    167         )
    168       );
     147  if ($conf['batch_download']['multisize'])
     148  {
     149    foreach (ImageStdParams::get_defined_type_map() as $params)
     150    {
     151      $template->append(
     152        'BATCH_DWN_SIZES',
     153        array(
     154          'TYPE' => $params->type,
     155          'DISPLAY' => l10n($params->type),
     156          'SIZE' => $params->sizing->ideal_size[0].' x '.$params->sizing->ideal_size[1],
     157          )
     158        );
     159        if ($params->type == $conf['batch_download']['photo_size']) break;
     160    }
     161    if ($conf['batch_download']['photo_size'] == 'original')
     162    {
     163      $template->append(
     164        'BATCH_DWN_SIZES',
     165        array(
     166          'TYPE' => 'original',
     167          'DISPLAY' => l10n('Original'),
     168          'SIZE' => null,
     169          )
     170        );
     171    }
     172  }
     173  else
     174  {
     175    $template->assign('BATCH_DWN_SIZE', $conf['batch_download']['photo_size']);
    169176  }
    170177   
Note: See TracChangeset for help on using the changeset viewer.