Ticket #403: 2005-09-30_init_image_cache.diff

File 2005-09-30_init_image_cache.diff, 802 bytes (added by Adam Di Carlo <aph@…>, 21 years ago)
  • mythweb/includes/init.php

     
    133133    require_once theme_dir."theme.php";
    134134
    135135// Make sure the image cache path exists
    136     $path = '';
    137     foreach (split('/+', image_cache) as $dir) {
    138         $path .= $path ? '/' . $dir : $dir;
    139         if(!is_dir($path) && !mkdir($path, 0755))
    140             trigger_error('Error creating path for '.$path.': Please check permissions.', FATAL);
    141     }
     136    if(!is_dir(image_cache) && !mkdir(image_cache, 0755))
     137        trigger_error('Error creating image cache path "'.image_cache.'": Please check permissions.', FATAL);
    142138
    143139// Clean out stale thumbnails
    144140    if (is_dir(image_cache)) {