Commit 2b426b39 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Html2Pdf.php: recode setting of $this->logFile.

parent b22db1f1
......@@ -42,6 +42,11 @@ class Html2Pdf {
*/
private $sip = null;
/**
* @var string
*/
private $logfile = '';
/**
* Read QFQ config. Only SYSTEM_BASE_URL_PRINT and SYSTEM_WKHTMLTOPDF will be used.
* Check and get all clean _GET Parameter. Build a URL based on SYSTEM_BASE_URL_PRINT and the delivered URL params.
......@@ -77,6 +82,7 @@ class Html2Pdf {
$this->sessionCookie = new SessionCookie($config);
$this->sip = new Sip($phpUnit);
$this->logFile = $config[SYSTEM_SQL_LOG];
}
/**
......@@ -152,13 +158,12 @@ class Html2Pdf {
*
* @param string $token TOKEN_URL | TOKEN_URL_PARAM
* @param string $url id=exportPage&r=123, www.nzz.ch/issue?id=456
* @param string $logFile Optional pathfilename of a logfile, where to log exec calls
* @return string rendered file - please delete later
* @throws CodeException
* @throws UserFormException
* @throws \exception
*/
public function page2pdf($token, $url, $logFile = '') {
public function page2pdf($token, $url) {
$rcArgs = array();
$urlParamString = '';
$host = '';
......@@ -210,8 +215,8 @@ class Html2Pdf {
$this->session->close();
$cmd = "$wkhtmlToPdf $customHeader $cookieOptions $options $urlPrint $filenameEscape";
if ($logFile != '') {
Logger::logMessage("Html2Pdf: $cmd", $logFile);
if ($this->logFile != '') {
Logger::logMessage("Html2Pdf: $cmd", $this->logFile);
}
$rc = 0;
$line = system($cmd, $rc);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment