Archived
1
0

General improvements

This commit is contained in:
Marcel
2019-01-04 19:44:00 +01:00
parent 2d6fa02b85
commit 4dbcd05e87
187 changed files with 185 additions and 89511 deletions

View File

@@ -28,12 +28,15 @@ class File extends MY_Controller
$isThumb = isset($_GET['w']) || isset($_GET['h']);
$w = isset($_GET['w']) ? $_GET['w'] : false;
$h = isset($_GET['h']) ? $_GET['h'] : false;
$imagePath = pathinfo($file['path'], PATHINFO_DIRNAME) . '/' .
$basePath = str_replace('\\', DIRECTORY_SEPARATOR, $file['path']);
$basePath = str_replace('/', DIRECTORY_SEPARATOR, $basePath);
$imagePath = pathinfo($basePath, PATHINFO_DIRNAME) . '/' .
($isThumb ? 'thumbs/' : '') .
$file['name'] .
($w ? '_w' . $w : '') .
($h ? '_h' . $h : '') .
'.' . pathinfo($file['path'], PATHINFO_EXTENSION);
'.' . pathinfo($basePath, PATHINFO_EXTENSION);
$imagePath = str_replace('/', DIRECTORY_SEPARATOR, $imagePath);
if (!file_exists($imagePath)) {
if(!$isThumb)