diff --git a/inc/3rdparty/libraries/PHPePub/EPub.php b/inc/3rdparty/libraries/PHPePub/EPub.php index f1f41bd..d9b990b 100644 --- a/inc/3rdparty/libraries/PHPePub/EPub.php +++ b/inc/3rdparty/libraries/PHPePub/EPub.php @@ -41,6 +41,8 @@ class EPub { private $bookVersion = EPub::BOOK_VERSION_EPUB2; + private $debugInside = FALSE; + public $maxImageWidth = 768; public $maxImageHeight = 1024; @@ -132,10 +134,14 @@ class EPub { * * @return void */ - function __construct($bookVersion = EPub::BOOK_VERSION_EPUB2, $languageCode = "en", $writingDirection = EPub::DIRECTION_LEFT_TO_RIGHT) { + function __construct($bookVersion = EPub::BOOK_VERSION_EPUB2, $debugInside = FALSE, $languageCode = "en", $writingDirection = EPub::DIRECTION_LEFT_TO_RIGHT) { include_once("Zip.php"); include_once("Logger.php"); + if (!$debugInside) { + error_reporting(E_ERROR | E_PARSE); + } + $this->bookVersion = $bookVersion; $this->writingDirection = $writingDirection; $this->languageCode = $languageCode; diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 1b69cd6..4139c4f 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -1142,11 +1142,11 @@ class Poche * return new purifier object with actual config */ protected function getPurifier() { - $config = HTMLPurifier_Config::createDefault(); - $config->set('Cache.SerializerPath', CACHE); - $config->set('HTML.SafeIframe', true); + $config = HTMLPurifier_Config::createDefault(); + $config->set('Cache.SerializerPath', CACHE); + $config->set('HTML.SafeIframe', true); $config->set('URI.SafeIframeRegexp', '%^(https?:)?//(www\.youtube(?:-nocookie)?\.com/embed/|player\.vimeo\.com/video/)%'); //allow YouTube and Vimeo$purifier = new HTMLPurifier($config); - + return new HTMLPurifier($config); } @@ -1208,7 +1208,7 @@ class Poche $fileDir = CACHE; - $book = new EPub(EPub::BOOK_VERSION_EPUB3); + $book = new EPub(EPub::BOOK_VERSION_EPUB3, DEBUG_POCHE); $log->logLine("new EPub()"); $log->logLine("EPub class version: " . EPub::VERSION); $log->logLine("EPub Req. Zip version: " . EPub::REQ_ZIP_VERSION);