From 6d749a6218d922b2f9bca9cc95f67a5cf99ab4fe Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 23 Jul 2009 19:30:49 +0000 Subject: [PATCH] Double->single converted, framework will abort if application is not found --- inc/includes.php | 10 +++------- inc/selector.php | 6 ++++++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/inc/includes.php b/inc/includes.php index 45d08bad..107fbed3 100644 --- a/inc/includes.php +++ b/inc/includes.php @@ -61,13 +61,9 @@ $application = preg_replace('/([^a-z0-9_-])+/i', '', $application); // Set the application name for later usage FrameworkConfiguration::getInstance()->setConfigEntry('app_name', $application); -/** - * Is the devel package included? - */ -if (is_dir(FrameworkConfiguration::getInstance()->readConfig('base_path') . "devel")) { - /** - * Load all development includes - */ +// Is the devel package included? +if (is_dir(FrameworkConfiguration::getInstance()->readConfig('base_path') . 'devel')) { + // Load all development includes ClassLoader::getInstance()->scanClassPath('devel'); } // END - if diff --git a/inc/selector.php b/inc/selector.php index 0fc66eac..05b2379d 100644 --- a/inc/selector.php +++ b/inc/selector.php @@ -37,6 +37,12 @@ $configAppIncludes = array( // Cache base path/file here $basePathFile = FrameworkConfiguration::getInstance()->readConfig('application_path') . FrameworkConfiguration::getInstance()->readConfig('app_name'); +// Is the directory there? +if (!is_dir($basePathFile)) { + // Not found. + trigger_error('Application ' . FrameworkConfiguration::getInstance()->readConfig('app_name') . ' not found.'); +} // END - if + // Load them all (try only) foreach ($configAppIncludes as $appInc) { // Skip starter in test mode -- 2.30.2