Luxbum.net - Script de galerie photo

Changeset 195

Show
Ignore:
Timestamp:
05/14/07 23:29:23 (2 years ago)
Author:
nicolas
Message:

fix bug: the default image is not correct

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/api/inc/files.php

    r189 r195  
    151151      return true; 
    152152   } 
     153    
     154   function isFile($dir, $file) { 
     155      return $file[0] != '.' 
     156         && !is_dir (luxbum::getFilePath($dir, $file) ); 
     157   } 
    153158     
    154159   /** 
  • trunk/api/process/luxbumgallery.php

    r191 r195  
    374374      } 
    375375 
    376  
    377376      // Search for an user defined image 
    378       if (is_file ($this->dirPath . DEFAULT_INDEX_FILE)) { 
    379          $fd = fopen ($this->dirPath . DEFAULT_INDEX_FILE, 'r+'); 
     377      if (is_file (luxbum::getFilePath($this->dir, DEFAULT_INDEX_FILE))) { 
     378         $fd = fopen (luxbum::getFilePath($this->dir, DEFAULT_INDEX_FILE), 'r+'); 
    380379         $line = fgets ($fd); 
    381                 
    382          if ( is_file ($this->dirPath . $line )) { 
     380          
     381         if ( files::isFile($this->dir, $line)) { 
    383382            $default = $line; 
    384383         }