Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
04eb48ce
Commit
04eb48ce
authored
Feb 29, 2016
by
Carsten Rose
Browse files
Report: implemented flag $phpUnit
Sip: moved initialization for $phpUnit from null to false
parent
5118391b
Changes
4
Hide whitespace changes
Inline
Side-by-side
extension/qfq/qfq/QuickFormQuery.php
View file @
04eb48ce
...
...
@@ -76,6 +76,8 @@ class QuickFormQuery {
*/
private
$t3data
=
array
();
// FormEelement Definition: all formElement.class='native' of the loaded form
private
$phpUnit
=
false
;
/*
* TODO:
* Preparation: setup logging, database access, record locking
...
...
@@ -98,6 +100,8 @@ class QuickFormQuery {
*/
public
function
__construct
(
array
$t3data
=
array
(),
$phpUnit
=
false
)
{
$this
->
phpUnit
=
$phpUnit
;
mb_internal_encoding
(
"UTF-8"
);
set_error_handler
(
"
\\
qfq
\\
ErrorHandler::exception_error_handler"
);
...
...
@@ -319,7 +323,7 @@ class QuickFormQuery {
* @return string
*/
private
function
doReport
()
{
$report
=
new
Report
(
$this
->
t3data
,
$this
->
store
->
getVar
(
SYSTEM_SESSIONNAME
,
STORE_SYSTEM
));
$report
=
new
Report
(
$this
->
t3data
,
$this
->
store
->
getVar
(
SYSTEM_SESSIONNAME
,
STORE_SYSTEM
)
,
$this
->
phpUnit
);
$html
=
$report
->
process
();
...
...
extension/qfq/qfq/report/Report.php
View file @
04eb48ce
...
...
@@ -74,15 +74,19 @@ class Report {
private
$t3data
=
array
();
private
$phpUnit
=
false
;
/**
* Report constructor.
*
* @param array $t3data
*/
public
function
__construct
(
array
$t3data
,
$sessionName
)
{
public
function
__construct
(
array
$t3data
,
$sessionName
,
$phpUnit
=
false
)
{
$this
->
phpUnit
=
$phpUnit
;
$this
->
t3data
=
$t3data
;
$this
->
sip
=
new
Sip
(
$sessionName
);
$this
->
sip
=
new
Sip
(
$sessionName
,
$phpUnit
);
$this
->
page_control
[
"msgbox"
][
"pagec"
]
=
"Please confirm!"
;
...
...
@@ -102,7 +106,7 @@ class Report {
$this
->
variables
=
new
Variables
(
$t3data
[
"uid"
]);
// Set static values, which won't change during this run.
$this
->
fr_error
[
"pid"
]
=
$this
->
variables
->
resultArray
[
'global.'
][
'page_id'
];
$this
->
fr_error
[
"pid"
]
=
isset
(
$this
->
variables
->
resultArray
[
'global.'
][
'page_id'
]
)
?
$this
->
variables
->
resultArray
[
'global.'
][
'page_id'
]
:
0
;
$this
->
fr_error
[
"uid"
]
=
$t3data
[
"uid"
];
$this
->
fr_error
[
"debug_level"
]
=
0
;
...
...
extension/qfq/qfq/store/Sip.php
View file @
04eb48ce
...
...
@@ -27,7 +27,7 @@ class Sip {
// $_SESSION[$sip] => <urlparam> >> $_SESSION['badcaffee1234'] => 'form=Person&r=1&z=5678'
// $_SESSION[$urlparam] => <sip> >> $_SESSION['form=Person&r=1&z=5678'] => 'badcaffee1234'
private
$phpUnit
=
null
;
private
$phpUnit
=
false
;
private
$staticUniqId
=
false
;
function
__construct
(
$sessionname
,
$phpUnit
=
false
)
{
...
...
extension/qfq/tests/phpunit/SanitizeTest.php
View file @
04eb48ce
...
...
@@ -8,7 +8,7 @@
namespace
qfq
;
require_once
(
__DIR__
.
'/../../qfq/helper/S
ANITIZE
.php'
);
require_once
(
__DIR__
.
'/../../qfq/helper/S
anitize
.php'
);
require_once
(
__DIR__
.
'/../../qfq/exceptions/CodeException.php'
);
...
...
@@ -51,7 +51,7 @@ class SanitizeTest extends \PHPUnit_Framework_TestCase {
*
*/
public
function
testSanitizeException
()
{
Sanitize
::
sanitize
(
'Hello World'
,
'invalid
SANITIZE
class'
);
Sanitize
::
sanitize
(
'Hello World'
,
'invalid
sanitize
class'
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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