Skip to content
GitLab
Menu
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
d84b8fec
Commit
d84b8fec
authored
Dec 22, 2018
by
Carsten Rose
Browse files
Refactor: SITE_PATH >> sitePath, EXT_PATH >> extPath, SYSTEM_PATH_EXT >> SYSTEM_EXT_PATH
parent
2a061253
Pipeline
#1223
passed with stage
in 1 minute and 31 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
extension/Documentation/Manual.rst
View file @
d84b8fec
...
...
@@ -531,9 +531,9 @@ After parsing the configuration, the following variables will be set automatical
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
| dbNameT3 | Name of the 'T3'-database. '{{dbNameT3:Y}} |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
|
SITE_PATH
| Absolute path of the current T3
I
nstan
z
. '{{
dbNameT3
:Y}}
|
|
sitePath
| Absolute path of the current T3
i
nstan
ce
. '{{
sitePath
:Y}} |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
|
EXT_PATH
| Absolute path of the QFQ extension. '{{
dbNameT3
:Y}} |
|
extPath
| Absolute path of the QFQ extension. '{{
extPath
:Y}}
|
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
...
...
extension/Source/core/Constants.php
View file @
d84b8fec
...
...
@@ -495,8 +495,8 @@ const SYSTEM_SEND_E_MAIL_OPTIONS = 'sendEMailOptions';
const
SYSTEM_EDIT_FORM_PAGE
=
'editFormPage'
;
// computed automatically during runtime
const
SYSTEM_
PATH_EXT
=
'EXT_PATH
'
;
const
SYSTEM_SITE_PATH
=
'
SITE_PATH
'
;
const
SYSTEM_
EXT_PATH
=
'extPath
'
;
const
SYSTEM_SITE_PATH
=
'
sitePath
'
;
const
SYSTEM_LDAP_1_RDN
=
'LDAP_1_RDN'
;
// Credentials to access LDAP
const
SYSTEM_LDAP_1_PASSWORD
=
'LDAP_1_PASSWORD'
;
// Credentials to access LDAP
...
...
extension/Source/core/report/Report.php
View file @
d84b8fec
...
...
@@ -193,7 +193,7 @@ class Report {
$sqlLog
=
$this
->
store
->
getVar
(
TYPO3_SQL_LOG
,
STORE_TYPO3
);
if
(
false
!==
$sqlLog
)
{
if
(
$sqlLog
!=
''
&&
$sqlLog
[
0
]
!==
'/'
)
{
$sqlLog
=
$this
->
store
->
getVar
(
SYSTEM_PATH
_EXT
,
STORE_SYSTEM
)
.
'/'
.
$sqlLog
;
$sqlLog
=
$this
->
store
->
getVar
(
SYSTEM_
EXT_
PATH
,
STORE_SYSTEM
)
.
'/'
.
$sqlLog
;
}
$this
->
store
->
setVar
(
SYSTEM_SQL_LOG
,
$sqlLog
,
STORE_SYSTEM
);
...
...
extension/Source/core/store/Store.php
View file @
d84b8fec
...
...
@@ -254,7 +254,7 @@ class Store {
private
static
function
doSystemPath
(
array
$config
)
{
// SYSTEM_PATH_EXT: compute only if not already defined.
if
(
!
isset
(
$config
[
SYSTEM_PATH
_EXT
])
||
$config
[
SYSTEM_PATH
_EXT
]
===
''
||
$config
[
SYSTEM_PATH
_EXT
][
0
]
!==
'/'
)
{
if
(
!
isset
(
$config
[
SYSTEM_
EXT_
PATH
])
||
$config
[
SYSTEM_
EXT_
PATH
]
===
''
||
$config
[
SYSTEM_
EXT_
PATH
][
0
]
!==
'/'
)
{
$relExtDir
=
'/typo3conf/ext/'
.
EXT_KEY
;
if
(
defined
(
'PHPUNIT_QFQ'
))
{
...
...
@@ -265,7 +265,7 @@ class Store {
}
// this means phpUnit.
$config
[
SYSTEM_SITE_PATH
]
=
substr
(
$cwd
,
0
,
$pos
);
$config
[
SYSTEM_PATH
_EXT
]
=
$config
[
SYSTEM_SITE_PATH
]
.
$relExtDir
;
$config
[
SYSTEM_
EXT_
PATH
]
=
$config
[
SYSTEM_SITE_PATH
]
.
$relExtDir
;
}
else
{
// If we are called through AJAX API (e.g. api/save.php), there is no TYPO3 environment.
...
...
@@ -273,11 +273,11 @@ class Store {
if
(
$pos
===
false
&&
isset
(
$GLOBALS
[
'TYPO3_LOADED_EXT'
][
EXT_KEY
][
'ext_localconf.php'
]))
{
// Typo3 extension: probably index.php
$config
[
SYSTEM_PATH
_EXT
]
=
dirname
(
$GLOBALS
[
'TYPO3_LOADED_EXT'
][
EXT_KEY
][
'ext_localconf.php'
]);
$config
[
SYSTEM_
EXT_
PATH
]
=
dirname
(
$GLOBALS
[
'TYPO3_LOADED_EXT'
][
EXT_KEY
][
'ext_localconf.php'
]);
$config
[
SYSTEM_SITE_PATH
]
=
dirname
(
$_SERVER
[
'SCRIPT_FILENAME'
]);
}
else
{
// API
$config
[
SYSTEM_PATH
_EXT
]
=
substr
(
$_SERVER
[
'SCRIPT_FILENAME'
],
0
,
$pos
+
strlen
(
$relExtDir
));
$config
[
SYSTEM_
EXT_
PATH
]
=
substr
(
$_SERVER
[
'SCRIPT_FILENAME'
],
0
,
$pos
+
strlen
(
$relExtDir
));
$config
[
SYSTEM_SITE_PATH
]
=
substr
(
$_SERVER
[
'SCRIPT_FILENAME'
],
0
,
$pos
);
}
}
...
...
@@ -307,7 +307,7 @@ class Store {
$config
[
SYSTEM_MAIL_LOG
]
=
$config
[
SYSTEM_SITE_PATH
]
.
'/'
.
$config
[
SYSTEM_MAIL_LOG
];
}
$config
[
SYSTEM_SEND_E_MAIL
]
=
$config
[
SYSTEM_PATH
_EXT
]
.
'/qfq/external/sendEmail'
;
$config
[
SYSTEM_SEND_E_MAIL
]
=
$config
[
SYSTEM_
EXT_
PATH
]
.
'/qfq/external/sendEmail'
;
// In case the database credentials are given in the old style: copy them to the new style
if
(
!
isset
(
$config
[
SYSTEM_DB_1_USER
])
&&
isset
(
$config
[
SYSTEM_DB_USER
]))
{
...
...
extension/Tests/unit/core/store/StoreTest.php
View file @
d84b8fec
...
...
@@ -413,7 +413,7 @@ EOT;
$config
=
$this
->
store
->
getStore
(
STORE_SYSTEM
);
# The following won't be checked by content, cause they will change on different installations.
foreach
([
TYPO3_SQL_LOG
,
SYSTEM_MAIL_LOG
,
SYSTEM_SITE_PATH
,
SYSTEM_PATH
_EXT
,
SYSTEM_SEND_E_MAIL
]
as
$key
)
{
foreach
([
TYPO3_SQL_LOG
,
SYSTEM_MAIL_LOG
,
SYSTEM_SITE_PATH
,
SYSTEM_
EXT_
PATH
,
SYSTEM_SEND_E_MAIL
]
as
$key
)
{
$this
->
assertTrue
(
isset
(
$config
[
$key
]),
"Missing default value for '
$key
' "
);
unset
(
$config
[
$key
]);
}
...
...
Write
Preview
Supports
Markdown
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