From 70ccc7bcf88f399486308be6a34a0d0942e7e275 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 3 Oct 2008 00:41:57 +0000 Subject: [PATCH] Config entry 'php_extension' is no longer used --- application/selector/class_ApplicationSelector.php | 2 +- .../middleware/compressor/class_CompressorChannel.php | 2 +- inc/config.php | 3 --- inc/database.php | 5 ++--- inc/includes.php | 2 +- inc/selector.php | 9 ++++----- 6 files changed, 9 insertions(+), 14 deletions(-) diff --git a/application/selector/class_ApplicationSelector.php b/application/selector/class_ApplicationSelector.php index 8d6d914..0d366b7 100644 --- a/application/selector/class_ApplicationSelector.php +++ b/application/selector/class_ApplicationSelector.php @@ -207,7 +207,7 @@ class ApplicationSelector extends BaseFrameworkSystem { // Is this a readable directory? (files will be ignored silently) if ((is_dir($fqfn)) && (is_readable($fqfn))) { // Then get the init.php script for analyzing - $initScript = sprintf("%s/init%s", $fqfn, $this->getConfigInstance()->readConfig('php_extension')); + $initScript = sprintf("%s/init.php", $fqfn); // Load the application's init.php script and append the // application to the ArrayObject diff --git a/inc/classes/middleware/compressor/class_CompressorChannel.php b/inc/classes/middleware/compressor/class_CompressorChannel.php index 266cf6f..6d3ede2 100644 --- a/inc/classes/middleware/compressor/class_CompressorChannel.php +++ b/inc/classes/middleware/compressor/class_CompressorChannel.php @@ -61,7 +61,7 @@ class CompressorChannel extends BaseMiddleware implements Registerable { // Read all directories but no sub directories while ($dir = $dirPointer->readDirectoryExcept(array("..", ".", ".htaccess", ".svn"))) { // Is this a class file? - if ((substr($dir, 0, 6) == "class_") && (substr($dir, -4, 4) == FrameworkConfiguration::getInstance()->readConfig('php_extension'))) { + if ((substr($dir, 0, 6) == "class_") && (substr($dir, -4, 4) == ".php")) { // Get the compressor's name. That's why you must name // your files like your classes and also that's why you // must keep on class in one file. diff --git a/inc/config.php b/inc/config.php index a9e58d7..1cf6715 100644 --- a/inc/config.php +++ b/inc/config.php @@ -50,9 +50,6 @@ $cfg->setDefaultTimezone("Europe/Berlin"); // CFG: MAGIC-QUOTES-RUNTIME $cfg->setMagicQuotesRuntime(false); -// CFG: PHP-SCRIPT-EXTENSION -$cfg->setConfigEntry('php_extension', ".php"); - // CFG: CLASS-PREFIX $cfg->setConfigEntry('class_prefix', "class_"); diff --git a/inc/database.php b/inc/database.php index 03bc377..f274f6c 100644 --- a/inc/database.php +++ b/inc/database.php @@ -29,10 +29,9 @@ $layerInstance = null; $cfg = FrameworkConfiguration::getInstance(); // Generate FQFN for the database layer -$INC = sprintf("%sinc/database/lib-%s%s", +$INC = sprintf("%sinc/database/lib-%s.php", $cfg->readConfig('base_path'), - $cfg->readConfig('db_type'), - $cfg->readConfig('php_extension') + $cfg->readConfig('db_type') ); // Load the database layer include diff --git a/inc/includes.php b/inc/includes.php index 54bd39b..7e3f5c9 100644 --- a/inc/includes.php +++ b/inc/includes.php @@ -26,7 +26,7 @@ $cfg = FrameworkConfiguration::getInstance(); // Include the class loader function -require(sprintf("%sinc/loader/class_ClassLoader%s", $cfg->readConfig('base_path'), $cfg->readConfig('php_extension'))); +require(sprintf("%sinc/loader/class_ClassLoader.php", $cfg->readConfig('base_path'))); // Does the user has an application specified? if (!empty($_GET['app'])) { diff --git a/inc/selector.php b/inc/selector.php index ddab769..819485e 100644 --- a/inc/selector.php +++ b/inc/selector.php @@ -45,11 +45,10 @@ foreach ($configAppIncludes as $inc) { } // Generate a FQFN for the helper class - $fqfn = sprintf("%s%s/%s%s", + $fqfn = sprintf("%s%s/%s.php", $cfg->readConfig('application_path'), $cfg->readConfig('app_name'), - $inc, - $cfg->readConfig('php_extension') + $inc ); // Does the include file exists? @@ -58,8 +57,8 @@ foreach ($configAppIncludes as $inc) { require_once($fqfn); } elseif ($cfg->readConfig('verbose_level') > 0) { // File is missing - trigger_error(sprintf("Cannot load application script %s! File is missing or read-protected.", - $inc . $cfg->readConfig('php_extension') + trigger_error(sprintf("Cannot load application script %s.php! File is missing or read-protected.", + $inc )); } } -- 2.39.5