aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--inc/3rdparty/libraries/PHPePub/EPub.php8
-rwxr-xr-xinc/poche/Poche.class.php10
2 files changed, 12 insertions, 6 deletions
diff --git a/inc/3rdparty/libraries/PHPePub/EPub.php b/inc/3rdparty/libraries/PHPePub/EPub.php
index f1f41bd5..d9b990b7 100644
--- a/inc/3rdparty/libraries/PHPePub/EPub.php
+++ b/inc/3rdparty/libraries/PHPePub/EPub.php
@@ -41,6 +41,8 @@ class EPub {
41 41
42 private $bookVersion = EPub::BOOK_VERSION_EPUB2; 42 private $bookVersion = EPub::BOOK_VERSION_EPUB2;
43 43
44 private $debugInside = FALSE;
45
44 public $maxImageWidth = 768; 46 public $maxImageWidth = 768;
45 public $maxImageHeight = 1024; 47 public $maxImageHeight = 1024;
46 48
@@ -132,10 +134,14 @@ class EPub {
132 * 134 *
133 * @return void 135 * @return void
134 */ 136 */
135 function __construct($bookVersion = EPub::BOOK_VERSION_EPUB2, $languageCode = "en", $writingDirection = EPub::DIRECTION_LEFT_TO_RIGHT) { 137 function __construct($bookVersion = EPub::BOOK_VERSION_EPUB2, $debugInside = FALSE, $languageCode = "en", $writingDirection = EPub::DIRECTION_LEFT_TO_RIGHT) {
136 include_once("Zip.php"); 138 include_once("Zip.php");
137 include_once("Logger.php"); 139 include_once("Logger.php");
138 140
141 if (!$debugInside) {
142 error_reporting(E_ERROR | E_PARSE);
143 }
144
139 $this->bookVersion = $bookVersion; 145 $this->bookVersion = $bookVersion;
140 $this->writingDirection = $writingDirection; 146 $this->writingDirection = $writingDirection;
141 $this->languageCode = $languageCode; 147 $this->languageCode = $languageCode;
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php
index 1b69cd61..4139c4f4 100755
--- a/inc/poche/Poche.class.php
+++ b/inc/poche/Poche.class.php
@@ -1142,11 +1142,11 @@ class Poche
1142 * return new purifier object with actual config 1142 * return new purifier object with actual config
1143 */ 1143 */
1144 protected function getPurifier() { 1144 protected function getPurifier() {
1145 $config = HTMLPurifier_Config::createDefault(); 1145 $config = HTMLPurifier_Config::createDefault();
1146 $config->set('Cache.SerializerPath', CACHE); 1146 $config->set('Cache.SerializerPath', CACHE);
1147 $config->set('HTML.SafeIframe', true); 1147 $config->set('HTML.SafeIframe', true);
1148 $config->set('URI.SafeIframeRegexp', '%^(https?:)?//(www\.youtube(?:-nocookie)?\.com/embed/|player\.vimeo\.com/video/)%'); //allow YouTube and Vimeo$purifier = new HTMLPurifier($config); 1148 $config->set('URI.SafeIframeRegexp', '%^(https?:)?//(www\.youtube(?:-nocookie)?\.com/embed/|player\.vimeo\.com/video/)%'); //allow YouTube and Vimeo$purifier = new HTMLPurifier($config);
1149 1149
1150 return new HTMLPurifier($config); 1150 return new HTMLPurifier($config);
1151 } 1151 }
1152 1152
@@ -1208,7 +1208,7 @@ class Poche
1208 $fileDir = CACHE; 1208 $fileDir = CACHE;
1209 1209
1210 1210
1211 $book = new EPub(EPub::BOOK_VERSION_EPUB3); 1211 $book = new EPub(EPub::BOOK_VERSION_EPUB3, DEBUG_POCHE);
1212 $log->logLine("new EPub()"); 1212 $log->logLine("new EPub()");
1213 $log->logLine("EPub class version: " . EPub::VERSION); 1213 $log->logLine("EPub class version: " . EPub::VERSION);
1214 $log->logLine("EPub Req. Zip version: " . EPub::REQ_ZIP_VERSION); 1214 $log->logLine("EPub Req. Zip version: " . EPub::REQ_ZIP_VERSION);