1
0
mirror of https://github.com/moparisthebest/wallabag synced 2024-11-23 17:42:15 -05:00

Merge pull request #722 from tcitworld/dev

do not output debug while generating epub
This commit is contained in:
tcitworld 2014-06-07 16:38:39 +02:00
commit 8142d4b1e6
2 changed files with 10 additions and 4 deletions

View File

@ -41,6 +41,8 @@ class EPub {
private $bookVersion = EPub::BOOK_VERSION_EPUB2; private $bookVersion = EPub::BOOK_VERSION_EPUB2;
private $debugInside = FALSE;
public $maxImageWidth = 768; public $maxImageWidth = 768;
public $maxImageHeight = 1024; public $maxImageHeight = 1024;
@ -132,10 +134,14 @@ class EPub {
* *
* @return void * @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("Zip.php");
include_once("Logger.php"); include_once("Logger.php");
if (!$debugInside) {
error_reporting(E_ERROR | E_PARSE);
}
$this->bookVersion = $bookVersion; $this->bookVersion = $bookVersion;
$this->writingDirection = $writingDirection; $this->writingDirection = $writingDirection;
$this->languageCode = $languageCode; $this->languageCode = $languageCode;

View File

@ -1144,6 +1144,7 @@ class Poche
$config = HTMLPurifier_Config::createDefault(); $config = HTMLPurifier_Config::createDefault();
$config->set('Cache.SerializerPath', CACHE); $config->set('Cache.SerializerPath', CACHE);
$config->set('HTML.SafeIframe', true); $config->set('HTML.SafeIframe', true);
//allow YouTube, Vimeo and dailymotion videos //allow YouTube, Vimeo and dailymotion videos
$config->set('URI.SafeIframeRegexp', '%^(https?:)?//(www\.youtube(?:-nocookie)?\.com/embed/|player\.vimeo\.com/video/|www\.dailymotion\.com/embed/video/)%'); $config->set('URI.SafeIframeRegexp', '%^(https?:)?//(www\.youtube(?:-nocookie)?\.com/embed/|player\.vimeo\.com/video/|www\.dailymotion\.com/embed/video/)%');
@ -1207,8 +1208,7 @@ class Poche
$log = new Logger("wallabag", TRUE); $log = new Logger("wallabag", TRUE);
$fileDir = CACHE; $fileDir = CACHE;
$book = new EPub(EPub::BOOK_VERSION_EPUB3, DEBUG_POCHE);
$book = new EPub(EPub::BOOK_VERSION_EPUB3);
$log->logLine("new EPub()"); $log->logLine("new EPub()");
$log->logLine("EPub class version: " . EPub::VERSION); $log->logLine("EPub class version: " . EPub::VERSION);
$log->logLine("EPub Req. Zip version: " . EPub::REQ_ZIP_VERSION); $log->logLine("EPub Req. Zip version: " . EPub::REQ_ZIP_VERSION);