diff --git a/app/modules/anpdf/anpdf.php b/app/modules/anpdf/anpdf.php index ced55b3..3cce68c 100644 --- a/app/modules/anpdf/anpdf.php +++ b/app/modules/anpdf/anpdf.php @@ -40,9 +40,18 @@ function read_kuri($hash, $page = 1, $scale = 1.5, $promo = false){ return False; } + $namefile = $price['pricehash'].'.pdf'; + $cachefile = PDFDIR.$namefile; + + if (file_exists($cachefile)){ + $pdfile = '/'.$namefile; + } + else { + $pdfile = '/file/'.$hash; + } + $id = $price['price_id']; - $pdfile = "/file/$hash"; - $maxpage = 32; + $maxpage = 24; $title = $price['pricename']; if (!$promo) diff --git a/app/routes/price.php b/app/routes/price.php index 474947e..1b1f79c 100644 --- a/app/routes/price.php +++ b/app/routes/price.php @@ -18,7 +18,6 @@ function anfilename($id){ - function file_kuri($hash) {