From 2c29ad378ef10f4eebf77ae02d11805355bcecbf Mon Sep 17 00:00:00 2001 From: Andrey Kuvshinov Date: Thu, 23 Apr 2020 21:43:44 +0300 Subject: [PATCH] add pgfile --- app/modules/anpdf/anpdf.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/modules/anpdf/anpdf.php b/app/modules/anpdf/anpdf.php index 1118c26..0d29d10 100644 --- a/app/modules/anpdf/anpdf.php +++ b/app/modules/anpdf/anpdf.php @@ -41,9 +41,13 @@ function read_kuri($hash, $page = 1, $scale = 1.5, $promo = false){ } $namefile = $hash.'.pdf'; + $pgfile = PGDIR.$hash.'/'.$hash.'-'.$page.'.pdf'; $cachefile = PDFDIR.$namefile; - if (file_exists($cachefile)){ + if (file_exists($pgfile)){ + $pdfile = '/pages/'.$pgfile; + } + elseif (file_exists($cachefile)){ $pdfile = '/pdf/'.$namefile; } else {