Change Thumb URL Creation

This commit is contained in:
seiichiro 2022-02-11 17:19:03 +01:00
parent dc91683b10
commit 3fc02a3a12
2 changed files with 5 additions and 3 deletions

View file

@ -30,7 +30,7 @@ $sort = $_GET['so'] ?? 1;
session_start();
// Initialize Thumbnail Handler
$t = new Thumb(Helpers::end_dir($imagedir.$dir), $thumbdir, 200, 200);
$t = new Thumb(Helpers::end_dir($imagedir.$dir), $thumbdir, $thumburl, 200, 200);
// Filelist Cache Handling
$cdir = $dir;

View file

@ -3,6 +3,7 @@
class thumb {
protected string $imagedir;
protected string $thumbdir;
protected string $thumburl;
protected int $w = 200;
protected int $h = 200;
@ -29,9 +30,10 @@ class thumb {
]
];
public function __construct($idir, $tdir, $width, $heigth) {
public function __construct($idir, $tdir, $turl, $width, $heigth) {
$this->imagedir = $idir;
$this->thumbdir = $tdir;
$this->thumburl = $turl;
$this->w = $width;
$this->h = $heigth;
}
@ -79,7 +81,7 @@ class thumb {
imagedestroy($image);
imagedestroy($thumbnail);
}
return $dstname.'.'.$ext;
return $this->thumburl.$dstname.'.'.$ext;
}
}