[cvs] commit: klutz backend.php klutz/config conf.php.dist klutz/lib/Driver file.php klutz/templates/backend backend.inc

Marcus I. Ryan marcus@riboflavin.net
Tue, 13 Aug 2002 12:47:55 -0700 (PDT)


marcus      2002/08/13 12:47:54 PDT

  Modified files:
    .                    backend.php 
    config               conf.php.dist 
    lib/Driver           file.php 
    templates/backend    backend.inc 
  Log:
  MAJOR UPDATE: PLEASE READ CLOSELY!!!
  
  (1 - minor)
  We store the md5 sum of each comic image so we don't get repeats.  Add an
  option to rebuild this file.
  
  (2 - MAJOR)
  To save a major programming headache I've had to remove some flexibility
  by getting rid of the option to name the subdirectories whatever you want.
  It now uses the ISO standard YYYYMMDD format, but this means existing
  installs must be rebuilt.  This only affects you if you use the file
  driver, which hopefully everyone is.
  
  WARNING: If you changed the subdirectory format setting from the default
  in conf.php, do NOT put the new conf.php.dist in place until you've run
  this script.
  
  Copy this script to your klutz directory and run it.  If you have more than
  a year of comics, fiddle with the script; you're just too ambitious ;)
  
  <?php
  
  @define('KLUTZ_BASE', dirname(__FILE__));
  
  $compression_control = 'none';
  $self_contained_auth = true;
  require_once KLUTZ_BASE . '/lib/base.php';
  
  $subdir = '%m%d%Y';
  if (array_key_exists('subdir',$conf['storage']['params'])) {
      $subdir = $conf['storage']['params']['subdir'];
  }
  
  $basedir = '/usr/local/data/Comics';
  if (array_key_exists('basedir', $conf['storage']['params'])) {
      $basedir = $conf['storage']['params']['basedir'];
  }
  if (substr($basedir,-1) != "/") {
      $basedir .= "/";
  }
  
  foreach (Klutz_Driver::listDates(time(), time() - 31536000) as $date) {
      $olddir = $basedir . strftime($subdir, $date);
      if (is_dir($olddir)) {
          $newdir = $basedir . date('Ymd', $date);
          rename($olddir, $newdir);
      }
  }
  $storage->rebuildSums();
  
  ?>
  
  Revision  Changes    Path
  1.20      +12 -2     klutz/backend.php
  1.6       +3 -5      klutz/config/conf.php.dist
  1.14      +33 -17    klutz/lib/Driver/file.php
  1.9       +8 -2      klutz/templates/backend/backend.inc

  Chora Links:
  http://cvs.horde.org/diff.php/klutz/backend.php?r1=1.19&r2=1.20&ty=u
  http://cvs.horde.org/diff.php/klutz/config/conf.php.dist?r1=1.5&r2=1.6&ty=u
  http://cvs.horde.org/diff.php/klutz/lib/Driver/file.php?r1=1.13&r2=1.14&ty=u
  http://cvs.horde.org/diff.php/klutz/templates/backend/backend.inc?r1=1.8&r2=1.9&ty=u