Ignore:
Timestamp:
Dec 3, 2006, 11:32:02 PM (17 years ago)
Author:
rub
Message:

Fixed Issue ID 0000494: Stats do not currently include Uploads
Fixed: Error when thumbnail directory not exists
Fixed: Apply current translation norme
Fixed: Improvement style sheet (like other PWG sheet)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions.inc.php

    r1609 r1631  
    216216}
    217217
     218/**
     219 * returns thumbnail directory name of input diretoty name
     220 * make thumbnail directory is necessary
     221 * set error messages on array messages
     222 *
     223 * @param:
     224 *  string $dirname
     225 *  arrayy $errors
     226 * @return bool false on error else string directory name
     227 */
     228function mkget_thumbnail_dir($dirname, &$errors)
     229{
     230  $tndir = $dirname.'/thumbnail';
     231  if (!is_dir($tndir))
     232  {
     233    if (!is_writable($dirname))
     234    {
     235      array_push($errors,
     236                 '['.$dirname.'] : '.l10n('no_write_access'));
     237      return false;
     238    }
     239    umask(0000);
     240    mkdir($tndir, 0777);
     241  }
     242
     243  return $tndir;
     244}
     245
    218246// The get_picture_size function return an array containing :
    219247//      - $picture_size[0] : final width
Note: See TracChangeset for help on using the changeset viewer.