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
67216154
Commit
67216154
authored
Jun 13, 2018
by
Carsten Rose
Browse files
Bug #5870 / Missing file config.qfq.ini: Clean QFQ message
parent
913fd09a
Changes
1
Hide whitespace changes
Inline
Side-by-side
extension/qfq/qfq/store/Config.php
View file @
67216154
...
...
@@ -32,7 +32,7 @@ class Config {
$content
=
'<?php'
.
PHP_EOL
.
'return ['
.
PHP_EOL
;
foreach
([
$pre
.
'_NAME'
,
$pre
.
'_PASSWORD'
,
$pre
.
'_SERVER'
,
$pre
.
'_USER'
,
SYSTEM_LDAP_1_RDN
,
SYSTEM_LDAP_1_PASSWORD
]
as
$key
){
foreach
([
$pre
.
'_NAME'
,
$pre
.
'_PASSWORD'
,
$pre
.
'_SERVER'
,
$pre
.
'_USER'
,
SYSTEM_LDAP_1_RDN
,
SYSTEM_LDAP_1_PASSWORD
]
as
$key
)
{
$content
.
=
" '
$key
' => '"
.
$config
[
$key
]
.
"',"
.
PHP_EOL
;
}
...
...
@@ -59,8 +59,8 @@ class Config {
$arr
=
explode
(
'='
,
$config
[
'custom'
.
$i
],
2
);
if
(
!
empty
(
$arr
[
0
])
&&
!
empty
(
$arr
[
1
]))
{
$arr
[
0
]
=
trim
(
$arr
[
0
]);
$arr
[
1
]
=
trim
(
$arr
[
1
]);
$arr
[
0
]
=
trim
(
$arr
[
0
]);
$arr
[
1
]
=
trim
(
$arr
[
1
]);
if
(
isset
(
$config
[
$arr
[
0
]]))
{
throw
new
UserReportException
(
"Variable '
$arr[0]
' already defined"
,
ERROR_INVALID_OR_MISSING_PARAMETER
);
...
...
@@ -111,15 +111,14 @@ class Config {
self
::
migrateConfigIniToPhp
(
$configIni
,
$configPhp
);
}
try
{
$config
=
include
(
$configPhp
);
$config
=
include
(
$configPhp
);
// in case $configIni doesn't exist: just skip
if
(
!
is_array
(
$config
))
{
$config
=
array
();
}
}
catch
(
\
Exception
$e
)
{
throw
new
qfq\UserFormException
(
"Error read file "
.
$pathTypo3Conf
.
": "
.
$e
->
getMessage
(),
ERROR_IO_READ_FILE
);
if
(
$config
===
false
)
{
throw
new
qfq\UserFormException
(
"Error read file: "
.
$configPhp
,
ERROR_IO_READ_FILE
);
}
// in case $configIni doesn't exist: just skip
if
(
!
is_array
(
$config
)
)
{
$config
=
array
(
);
}
$configT3qfq
=
self
::
getCustomVariable
(
$configT3qfq
);
...
...
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