From a0b468e109a0c6fc0cc5b904b7f118e2c10b3972 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 22 May 2017 20:48:39 +0200 Subject: [PATCH] use DIRECTORY_SEPARATOR instead of plain '/' MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- framework/config-global.php | 4 ++-- framework/main/classes/class_BaseFrameworkSystem.php | 2 +- .../database/backend/class_CachedLocalFileDatabase.php | 8 ++++---- framework/main/classes/template/class_ | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/framework/config-global.php b/framework/config-global.php index ad84b428..5a9edd6c 100644 --- a/framework/config-global.php +++ b/framework/config-global.php @@ -33,7 +33,7 @@ use CoreFramework\EntryPoint\ApplicationEntryPoint; $cfg = FrameworkConfiguration::getSelfInstance(); // CFG: ROOT-BASE-PATH -$cfg->setConfigEntry('root_base_path', ApplicationEntryPoint::getRootPath() . '/'); +$cfg->setConfigEntry('root_base_path', ApplicationEntryPoint::getRootPath() . DIRECTORY_SEPARATOR); // CFG: CORE-BASE-PATH $cfg->setConfigEntry('framework_base_path', ApplicationEntryPoint::detectFrameworkPath()); @@ -298,7 +298,7 @@ $cfg->setConfigEntry('guest_class', 'CoreFramework\User\Guest\Guest'); $cfg->setConfigEntry('cookie_expire', (60*60*2)); // Two hours! // CFG: COOKIE-PATH -$cfg->setConfigEntry('cookie_path', $cfg->detectScriptPath() . '/'); +$cfg->setConfigEntry('cookie_path', $cfg->detectScriptPath() . DIRECTORY_SEPARATOR); // CFG: COOKIE-DOMAIN $cfg->setConfigEntry('cookie_domain', $cfg->detectDomain()); // Is mostly the same... diff --git a/framework/main/classes/class_BaseFrameworkSystem.php b/framework/main/classes/class_BaseFrameworkSystem.php index 8338268f..c33c7944 100644 --- a/framework/main/classes/class_BaseFrameworkSystem.php +++ b/framework/main/classes/class_BaseFrameworkSystem.php @@ -3219,7 +3219,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { } // END - if // Add it - $fqfn = $basePath . '/' . $fileName; + $fqfn = $basePath . DIRECTORY_SEPARATOR . $fileName; // Is it reachable? if (!FrameworkBootstrap::isReachableFilePath($fqfn)) { diff --git a/framework/main/classes/database/backend/class_CachedLocalFileDatabase.php b/framework/main/classes/database/backend/class_CachedLocalFileDatabase.php index 2efa187e..ff43ed6b 100644 --- a/framework/main/classes/database/backend/class_CachedLocalFileDatabase.php +++ b/framework/main/classes/database/backend/class_CachedLocalFileDatabase.php @@ -257,7 +257,7 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac */ private function generateFqfnFromDataSet (Criteria $dataSetInstance, $rowName) { // This is the FQFN - $fqfn = $this->getConfigInstance()->getConfigEntry('local_database_path') . $dataSetInstance->getTableName() . '/' . $rowName . '.' . $this->getFileExtension(); + $fqfn = $this->getConfigInstance()->getConfigEntry('local_database_path') . $dataSetInstance->getTableName() . DIRECTORY_SEPARATOR . $rowName . '.' . $this->getFileExtension(); // Return it return $fqfn; @@ -359,7 +359,7 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac $resultData = NULL; // Create full path name - $pathName = $this->getConfigInstance()->getConfigEntry('local_database_path') . $tableName . '/'; + $pathName = $this->getConfigInstance()->getConfigEntry('local_database_path') . $tableName . DIRECTORY_SEPARATOR; /* * A 'select' query is not that easy on local files, so first try to @@ -502,7 +502,7 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac */ public function queryUpdateDataSet (StoreableCriteria $dataSetInstance) { // Create full path name - $pathName = $this->getConfigInstance()->getConfigEntry('local_database_path') . $dataSetInstance->getTableName() . '/'; + $pathName = $this->getConfigInstance()->getConfigEntry('local_database_path') . $dataSetInstance->getTableName() . DIRECTORY_SEPARATOR; // Try all the requests try { @@ -646,7 +646,7 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE: tableName=' . $tableName . ' - CALLED!'); // Create full path name - $pathName = $this->getConfigInstance()->getConfigEntry('local_database_path') . $tableName . '/'; + $pathName = $this->getConfigInstance()->getConfigEntry('local_database_path') . $tableName . DIRECTORY_SEPARATOR; // Try all the requests try { diff --git a/framework/main/classes/template/class_ b/framework/main/classes/template/class_ index 688d1499..1b105d7a 100644 --- a/framework/main/classes/template/class_ +++ b/framework/main/classes/template/class_ @@ -55,7 +55,7 @@ class ???TemplateEngine extends BaseTemplateEngine implements CompileableTemplat $templateInstance = new ???TemplateEngine(); // Determine base path - $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getRequestInstance()->getRequestElement('app') . '/'; + $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getRequestInstance()->getRequestElement('app') . DIRECTORY_SEPARATOR; // Is the base path valid? if (empty($templateBasePath)) { -- 2.30.2