From 08c0f274a4d71d3a1c953c17702d889df0b6ec95 Mon Sep 17 00:00:00 2001 From: Andrey Kuvshinov Date: Thu, 23 Apr 2020 17:50:17 +0300 Subject: [PATCH] add PGDIR --- app/confg.php | 1 + app/modules/anpdf/anpdf.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/confg.php b/app/confg.php index 31077ba..b196d73 100644 --- a/app/confg.php +++ b/app/confg.php @@ -12,6 +12,7 @@ else define('SITEPATH', dirname(__FILE__)); define('PDFDIR', '/vhosts/anpdf/app/pub/files/pdf/'); +define('PGDIR', '/vhosts/anpdf/app/pub/files/pages/'); define('API', 'http://api.argumenti.ru/'); db_config('argumentiru', 'mysql:host=mysql;dbname=argumentiru', 'newser', 'Chjk90yuiREY'); diff --git a/app/modules/anpdf/anpdf.php b/app/modules/anpdf/anpdf.php index d139cc9..b1223cc 100644 --- a/app/modules/anpdf/anpdf.php +++ b/app/modules/anpdf/anpdf.php @@ -41,7 +41,7 @@ function read_kuri($hash, $page = 1, $scale = 1.5, $promo = false){ } $namefile = $hash.'.pdf'; - $cachefile = PDFDIR.$hash.'-'.$page.'.pdf'; + $cachefile = PGDIR.$hash.'/'.$hash.'-'.$page.'.pdf'; if (file_exists($cachefile)){ $pdfile = '/'.$namefile;