Change Thumb URL Creation
This commit is contained in:
parent
dc91683b10
commit
3fc02a3a12
2 changed files with 5 additions and 3 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue