app/maguttiCms/Tools/ImgHelper.php
// returns absolute path to image or placeholder if missing
returns absolute path to image or placeholder if missing
returns absolute path to image or placeholder if missing
private function resolve_path($file_name, $absolute)
    {
        if ($absolute) {
            if (@getimagesize($file_name)) {
                return $file_name;
            }
        } else {
            if ($file_name && file_exists($this->resolveRepositoryPath() . $file_name)) {
                $metadata = @getimagesize($this->resolveRepositoryPath() . $file_name);
                if ($metadata[0] <= $this->size_limit && $metadata[1] <= $this->size_limit) {
                    return $this->resolveRepositoryPath() . $file_name;
                }
            }
        }
        return $this->path_repository . 'placeholder.png';
    }
private function resolve_path ( $ file_name , $ absolute ) { if ( $ absolute ) { if ( @ getimagesize ( $ file_name ) ) { return $ file_name ; } } else { if ( $ file_name && file_exists ( $ this -> resolveRepositoryPath ( ) . $ file_name ) ) { $ metadata = @ getimagesize ( $ this -> resolveRepositoryPath ( ) . $ file_name ) ; if ( $ metadata [ 0 ] <= $ this -> size_limit && $ metadata [ 1 ] <= $ this -> size_limit ) { return $ this -> resolveRepositoryPath ( ) . $ file_name ; } } } return $ this -> path_repository . 'placeholder.png' ; }
returns absolute path to image or placeholder if missing
returns absolute path to image or placeholder if missing