From 865f9ee53d764835f18d217bf0d50aba81c6930e Mon Sep 17 00:00:00 2001 From: antongorodezkiy Date: Mon, 11 Sep 2017 18:20:42 +0300 Subject: [PATCH] 1.3.19 - First page thumbnail bug fix --- README.md | 7 +++++-- controllers/PdfController.php | 6 +++++- documentation/index.html | 9 +++++++-- pdf-light-viewer.php | 2 +- readme.txt | 5 ++++- 5 files changed, 22 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 3c6e19f..03f8ffe 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ **Tested up to:** 4.7 -**Stable tag:** 1.3.18 +**Stable tag:** 1.3.19 **License:** GPLv2 @@ -80,7 +80,10 @@ Plugin allows you to embed normal, big and very big pdf documents to the wordpre ## Changelog ## -# 1.3.18 - 2017-07-27 +## 1.3.19 - 2017-09-11 +* First page thumbnail bug fix + +## 1.3.18 - 2017-07-27 * PDF support improvement ## 1.3.17 - 2017-03-29 diff --git a/controllers/PdfController.php b/controllers/PdfController.php index e0c5bec..4c29160 100644 --- a/controllers/PdfController.php +++ b/controllers/PdfController.php @@ -682,7 +682,7 @@ public static function getFirstPageGeometry( @shell_exec($commnad); - $first_page_path = $pdf_upload_dir.'/page-'.$page_number.'.jpg'; + $first_page_path = $first_page_image_path = $pdf_upload_dir.'/page-'.$page_number.'.jpg'; } else { $first_page_path = $pdf_file_path; @@ -703,6 +703,10 @@ public static function getFirstPageGeometry( $Imagick->destroy(); } + if (file_exists($first_page_image_path) && is_file($first_page_image_path)) { + unlink($first_page_image_path); + } + return $geometry; } diff --git a/documentation/index.html b/documentation/index.html index f7399d0..0071d45 100644 --- a/documentation/index.html +++ b/documentation/index.html @@ -4,7 +4,7 @@ - WordPress PDF Light Viewer Plugin & Pro Addon Documentation for version 1.3.18 & pro 0.1.4 + WordPress PDF Light Viewer Plugin & Pro Addon Documentation for version 1.3.19 & pro 0.1.4 @@ -88,7 +88,7 @@
-

WordPress PDF Light Viewer Plugin v1.3.16
& PRO Addon v0.1.4
Documentation

+

WordPress PDF Light Viewer Plugin v1.3.19
& PRO Addon v0.1.4
Documentation

What did you get?

@@ -772,6 +772,11 @@

Changelog

PDF Light Viewer

+

1.3.19 - 2017-09-11

+ +

1.3.18 - 2017-07-27