From ac2da036ee3d9f5b5623cc1883a1502d37d22b33 Mon Sep 17 00:00:00 2001 From: Andrey Kuvshinov Date: Thu, 23 Apr 2020 18:19:11 +0300 Subject: [PATCH] reverse pdf file --- app/confg.php | 2 +- app/modules/anpdf/anpdf.php | 2 +- scripts/splitpdf.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/confg.php b/app/confg.php index b196d73..b25ad72 100644 --- a/app/confg.php +++ b/app/confg.php @@ -12,7 +12,7 @@ else define('SITEPATH', dirname(__FILE__)); define('PDFDIR', '/vhosts/anpdf/app/pub/files/pdf/'); -define('PGDIR', '/vhosts/anpdf/app/pub/files/pages/'); +define('PGDIR', '/vhosts/anpdf/app/pub/files/pdf/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 b1223cc..4e77503 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 = PGDIR.$hash.'/'.$hash.'-'.$page.'.pdf'; + $cachefile = PDFDIR.$namefile; if (file_exists($cachefile)){ $pdfile = '/'.$namefile; diff --git a/scripts/splitpdf.sh b/scripts/splitpdf.sh index c206bb6..4e21454 100644 --- a/scripts/splitpdf.sh +++ b/scripts/splitpdf.sh @@ -3,7 +3,7 @@ #PDFDIR=~/vhosts/an/httpdocs/pub/files/pdf/pdf/ PDFDIR=~/vhosts/anpdf/app/pub/files/pdf -OUTDIR=~/vhosts/anpdf/app/pub/files/pages +OUTDIR=~/vhosts/anpdf/app/pub/files/pdf/pages cd $PDFDIR