1
0
This commit is contained in:
2020-01-17 01:28:34 +01:00
parent 85f107e8bd
commit b2e90d2f42
11 changed files with 282 additions and 323 deletions

View File

@@ -2,11 +2,15 @@
class Books
{
/** @var Website */
private $site;
/** @var array */
private $staticData;
public function __construct()
public function __construct(Website $site)
{
$this->site = $site;
$this->load();
}
@@ -104,12 +108,10 @@ class Books
public function createPreview($prog)
{
global $CONFIG;
$src = $prog['imgfront_path'];
$dst = $prog['preview_path'];
if ($CONFIG['use_magick'])
if ($this->site->config['use_magick'])
magick_resize_image($src, 200, 0, $dst);
else
smart_resize_image($src, 200, 0, true, $dst);