add pgfile

This commit is contained in:
Andrey Kuvshinov
2020-04-23 21:43:44 +03:00
parent a9a7571a23
commit 2c29ad378e

View File

@@ -41,9 +41,13 @@ function read_kuri($hash, $page = 1, $scale = 1.5, $promo = false){
} }
$namefile = $hash.'.pdf'; $namefile = $hash.'.pdf';
$pgfile = PGDIR.$hash.'/'.$hash.'-'.$page.'.pdf';
$cachefile = PDFDIR.$namefile; $cachefile = PDFDIR.$namefile;
if (file_exists($cachefile)){ if (file_exists($pgfile)){
$pdfile = '/pages/'.$pgfile;
}
elseif (file_exists($cachefile)){
$pdfile = '/pdf/'.$namefile; $pdfile = '/pdf/'.$namefile;
} }
else { else {