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
0a924c32
Commit
0a924c32
authored
Jun 13, 2018
by
Carsten Rose
Browse files
Fix inconsistency with static class Config.
parent
01d11e6c
Changes
3
Hide whitespace changes
Inline
Side-by-side
extension/qfq/qfq/report/Html2Pdf.php
View file @
0a924c32
...
...
@@ -64,8 +64,7 @@ class Html2Pdf {
public
function
__construct
(
array
$config
=
array
(),
$phpUnit
=
false
)
{
if
(
count
(
$config
)
==
0
)
{
$cfg
=
new
Config
();
$config
=
$cfg
->
readConfig
(
''
);
$config
=
Config
::
readConfig
(
''
);
}
$this
->
config
=
$config
;
...
...
extension/qfq/qfq/store/Config.php
View file @
0a924c32
...
...
@@ -24,7 +24,7 @@ class Config {
* @param $configIni
* @param $configPhp
*/
private
function
migrateConfigIniToPhp
(
$configIni
,
$configPhp
)
{
private
static
function
migrateConfigIniToPhp
(
$configIni
,
$configPhp
)
{
$config
=
parse_ini_file
(
$configIni
,
false
);
...
...
@@ -52,7 +52,7 @@ class Config {
* @return array
* @throws UserReportException
*/
private
function
getCustomVariable
(
array
$config
)
{
private
static
function
getCustomVariable
(
array
$config
)
{
for
(
$i
=
1
;
$i
<=
30
;
$i
++
)
{
if
(
isset
(
$config
[
'custom'
.
$i
]))
{
...
...
@@ -82,7 +82,7 @@ class Config {
* @throws UserFormException
* @throws UserReportException
*/
public
function
readConfig
(
$configIni
=
''
)
{
public
static
function
readConfig
(
$configIni
=
''
)
{
$configT3qfq
=
array
();
// Production Path to CONFIG_INI
...
...
@@ -108,7 +108,7 @@ class Config {
// Migrate legacy config file.
if
(
is_readable
(
$configIni
)
&&
!
is_readable
(
$configPhp
))
{
$this
->
migrateConfigIniToPhp
(
$configIni
,
$configPhp
);
self
::
migrateConfigIniToPhp
(
$configIni
,
$configPhp
);
}
try
{
...
...
@@ -122,7 +122,7 @@ class Config {
throw
new
qfq\UserFormException
(
"Error read file "
.
$pathTypo3Conf
.
": "
.
$e
->
getMessage
(),
ERROR_IO_READ_FILE
);
}
$configT3qfq
=
$this
->
getCustomVariable
(
$configT3qfq
);
$configT3qfq
=
self
::
getCustomVariable
(
$configT3qfq
);
// Settings in config.qfq.ini overwrite T3 settings
$config
=
array_merge
(
$configT3qfq
,
$config
);
...
...
@@ -159,6 +159,7 @@ class Config {
/**
* @param array $config
* @throws UserFormException
* @throws UserReportException
*/
private
static
function
checkForAttack
(
array
$config
)
{
$attack
=
false
;
...
...
@@ -209,6 +210,7 @@ class Config {
* @param array $config
* @param string $getParamName
* @throws UserFormException
* @throws UserReportException
*/
public
static
function
attackDetectedExitNow
(
array
$config
=
array
(),
$getParamName
=
''
)
{
...
...
extension/qfq/qfq/store/Store.php
View file @
0a924c32
...
...
@@ -181,11 +181,11 @@ class Store {
* @param string $fileConfigIni
* @throws CodeException
* @throws UserFormException
* @throws UserReportException
*/
private
static
function
fillStoreSystem
(
$fileConfigIni
=
''
)
{
$cfg
=
new
Config
();
$config
=
$cfg
->
readConfig
(
$fileConfigIni
);
$config
=
Config
::
readConfig
(
$fileConfigIni
);
$config
=
self
::
doSystemPath
(
$config
);
$config
=
self
::
adjustConfig
(
$config
);
...
...
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