correct cachefile
This commit is contained in:
@@ -43,9 +43,6 @@ function pdfs_init($source, $page = 1){
|
||||
|
||||
$result = array();
|
||||
|
||||
if (!file_exists($source))
|
||||
return false;
|
||||
|
||||
$result['count'] = pdfs_count($source); // количество страниц
|
||||
$result['pdfurl'] = SITE.trim(pdfs_cachefile($source), '/'); //полный файл на скачку
|
||||
|
||||
@@ -56,6 +53,9 @@ function pdfs_init($source, $page = 1){
|
||||
$fullcachefile = $cachedir.$cachefile;
|
||||
|
||||
if (!file_exists($fullcachefile)){
|
||||
|
||||
if (!file_exists($source))
|
||||
return false;
|
||||
|
||||
if (!is_dir($cachedir))
|
||||
mkdir($cachedir);
|
||||
|
||||
Reference in New Issue
Block a user