Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
2b426b39
Commit
2b426b39
authored
May 18, 2017
by
Carsten Rose
Browse files
Html2Pdf.php: recode setting of $this->logFile.
parent
b22db1f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
extension/qfq/qfq/report/Html2Pdf.php
View file @
2b426b39
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment