Ignore:
Timestamp:
Mar 5, 2006, 12:31:46 AM (18 years ago)
Author:
plg
Message:

new feature: source/destination links between categories. Will we keep this
feature? Code is complicated and very few people will understand how it
works...

modification: #images.storage_category_id replaced by
#image_category.is_storage

improvement: many code refactoring to improve readibility

improvement: virtual category creation code was moved to a dedicated
function in order to be called from admin/cat_list.php and
admin/cat_modify.php (create a new destination category)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/site_reader_local.php

    r1058 r1064  
    4545{
    4646  global $errors;
     47 
    4748  if (!is_dir($this->site_url))
    4849  {
    49     array_push($errors, array('path' => $this->site_url, 'type' => 'PWG-ERROR-NO-FS'));
     50    array_push(
     51      $errors,
     52      array(
     53        'path' => $this->site_url,
     54        'type' => 'PWG-ERROR-NO-FS'
     55        )
     56      );
     57   
    5058    return false;
    5159  }
     60 
    5261  return true;
    5362}
     
    136145{
    137146  global $conf;
    138   $update_fields = array( 'has_high', 'representative_ext',
    139       'filesize', 'width', 'height' );
     147 
     148  $update_fields = array(
     149    'has_high', 'representative_ext', 'filesize', 'width', 'height'
     150    );
     151 
    140152  if ($conf['use_exif'])
    141153  {
     
    155167        );
    156168  }
     169 
    157170  return $update_fields;
    158171}
     
    170183
    171184  $filename = basename($file);
    172   $data['has_high'] = $this->get_has_high( dirname($file), $filename );
    173   $data['representative_ext'] = $this->get_representative_ext( dirname($file),
    174                                         get_filename_wo_extension($filename) );
     185 
     186  $data['has_high'] = $this->get_has_high(dirname($file), $filename);
     187 
     188  $data['representative_ext'] = $this->get_representative_ext(
     189    dirname($file),
     190    get_filename_wo_extension($filename)
     191    );
    175192
    176193  $data['filesize'] = floor(filesize($file)/1024);
     
    205222    }
    206223  }
     224 
    207225  return $data;
    208226}
     
    213231{
    214232  global $conf;
    215   $base_test = $path.'/pwg_representative/';
    216   $base_test.= $filename_wo_ext.'.';
     233  $base_test = $path.'/pwg_representative/'.$filename_wo_ext.'.';
    217234  foreach ($conf['picture_ext'] as $ext)
    218235  {
     
    229246{
    230247  global $conf;
    231   $base_test = $path.'/thumbnail/';
    232   $base_test.= $conf['prefix_thumbnail'].$filename_wo_ext.'.';
     248 
     249  $base_test =
     250    $path.'/thumbnail/'.$conf['prefix_thumbnail'].$filename_wo_ext.'.';
     251 
    233252  foreach ($conf['picture_ext'] as $ext)
    234253  {
     
    239258    }
    240259  }
     260 
    241261  return null;
    242262}
     
    248268    return 'true';
    249269  }
     270 
    250271  return null;
    251272}
Note: See TracChangeset for help on using the changeset viewer.