Commit d84b8fec authored by Carsten  Rose's avatar 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
...@@ -531,9 +531,9 @@ After parsing the configuration, the following variables will be set automatical ...@@ -531,9 +531,9 @@ After parsing the configuration, the following variables will be set automatical
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
| dbNameT3 | Name of the 'T3'-database. '{{dbNameT3:Y}} | | dbNameT3 | Name of the 'T3'-database. '{{dbNameT3:Y}} |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
| SITE_PATH | Absolute path of the current T3 Instanz. '{{dbNameT3:Y}} | | sitePath | Absolute path of the current T3 instance. '{{sitePath:Y}} |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
| EXT_PATH | Absolute path of the QFQ extension. '{{dbNameT3:Y}} | | extPath | Absolute path of the QFQ extension. '{{extPath:Y}} |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
......
...@@ -495,8 +495,8 @@ const SYSTEM_SEND_E_MAIL_OPTIONS = 'sendEMailOptions'; ...@@ -495,8 +495,8 @@ const SYSTEM_SEND_E_MAIL_OPTIONS = 'sendEMailOptions';
const SYSTEM_EDIT_FORM_PAGE = 'editFormPage'; const SYSTEM_EDIT_FORM_PAGE = 'editFormPage';
// computed automatically during runtime // computed automatically during runtime
const SYSTEM_PATH_EXT = 'EXT_PATH'; const SYSTEM_EXT_PATH = 'extPath';
const SYSTEM_SITE_PATH = 'SITE_PATH'; const SYSTEM_SITE_PATH = 'sitePath';
const SYSTEM_LDAP_1_RDN = 'LDAP_1_RDN'; // Credentials to access LDAP const SYSTEM_LDAP_1_RDN = 'LDAP_1_RDN'; // Credentials to access LDAP
const SYSTEM_LDAP_1_PASSWORD = 'LDAP_1_PASSWORD'; // Credentials to access LDAP const SYSTEM_LDAP_1_PASSWORD = 'LDAP_1_PASSWORD'; // Credentials to access LDAP
......
...@@ -193,7 +193,7 @@ class Report { ...@@ -193,7 +193,7 @@ class Report {
$sqlLog = $this->store->getVar(TYPO3_SQL_LOG, STORE_TYPO3); $sqlLog = $this->store->getVar(TYPO3_SQL_LOG, STORE_TYPO3);
if (false !== $sqlLog) { if (false !== $sqlLog) {
if ($sqlLog != '' && $sqlLog[0] !== '/') { 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); $this->store->setVar(SYSTEM_SQL_LOG, $sqlLog, STORE_SYSTEM);
......
...@@ -254,7 +254,7 @@ class Store { ...@@ -254,7 +254,7 @@ class Store {
private static function doSystemPath(array $config) { private static function doSystemPath(array $config) {
// SYSTEM_PATH_EXT: compute only if not already defined. // 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; $relExtDir = '/typo3conf/ext/' . EXT_KEY;
if (defined('PHPUNIT_QFQ')) { if (defined('PHPUNIT_QFQ')) {
...@@ -265,7 +265,7 @@ class Store { ...@@ -265,7 +265,7 @@ class Store {
} }
// this means phpUnit. // this means phpUnit.
$config[SYSTEM_SITE_PATH] = substr($cwd, 0, $pos); $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 { } else {
// If we are called through AJAX API (e.g. api/save.php), there is no TYPO3 environment. // If we are called through AJAX API (e.g. api/save.php), there is no TYPO3 environment.
...@@ -273,11 +273,11 @@ class Store { ...@@ -273,11 +273,11 @@ class Store {
if ($pos === false && isset($GLOBALS['TYPO3_LOADED_EXT'][EXT_KEY]['ext_localconf.php'])) { if ($pos === false && isset($GLOBALS['TYPO3_LOADED_EXT'][EXT_KEY]['ext_localconf.php'])) {
// Typo3 extension: probably index.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']); $config[SYSTEM_SITE_PATH] = dirname($_SERVER['SCRIPT_FILENAME']);
} else { } else {
// API // 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); $config[SYSTEM_SITE_PATH] = substr($_SERVER['SCRIPT_FILENAME'], 0, $pos);
} }
} }
...@@ -307,7 +307,7 @@ class Store { ...@@ -307,7 +307,7 @@ class Store {
$config[SYSTEM_MAIL_LOG] = $config[SYSTEM_SITE_PATH] . '/' . $config[SYSTEM_MAIL_LOG]; $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 // 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])) { if (!isset($config[SYSTEM_DB_1_USER]) && isset($config[SYSTEM_DB_USER])) {
......
...@@ -413,7 +413,7 @@ EOT; ...@@ -413,7 +413,7 @@ EOT;
$config = $this->store->getStore(STORE_SYSTEM); $config = $this->store->getStore(STORE_SYSTEM);
# The following won't be checked by content, cause they will change on different installations. # 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' " ); $this->assertTrue(isset($config[$key]), "Missing default value for '$key' " );
unset ($config[$key]); unset ($config[$key]);
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment