Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1873)
+++ branches/2.8.x/CHANGELOG	(revision 1874)
@@ -11,6 +11,9 @@
 ! = Update/Change
 ===============================================================================
 
+27 Feb-2013 Build 1874 Werner v.d.Decken(DarkViper)
+# some little typo fixes in initialize.php
+# readConfiguration() fixed in initialize.php
 27 Feb-2013 Build 1873 Werner v.d.Decken(DarkViper)
 # some small fixes in packet Translate
 25 Feb-2013 Build 1872 Dietmar Woellbrink (Luisehahne)
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 1873)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 1874)
@@ -51,5 +51,5 @@
 
 // check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
 if(!defined('VERSION')) define('VERSION', '2.8.3');
-if(!defined('REVISION')) define('REVISION', '1873');
+if(!defined('REVISION')) define('REVISION', '1874');
 if(!defined('SP')) define('SP', '');
Index: branches/2.8.x/wb/framework/initialize.php
===================================================================
--- branches/2.8.x/wb/framework/initialize.php	(revision 1873)
+++ branches/2.8.x/wb/framework/initialize.php	(revision 1874)
@@ -92,8 +92,23 @@
  * 
  */
 	function readConfiguration($sRetvalType = 'url') {
+		// check for valid file request. Becomes more stronger in next version
 		$x = debug_backtrace();
-		if(sizeof($x) != 0) { throw new RuntimeException('illegal function request!'); }
+		$bValidRequest = false;
+		if(sizeof($x) != 0) {
+			foreach($x as $aStep) {
+				// define the scripts which can read the configuration
+				if(preg_match('/(index.php|config.php|upgrade-script.php)$/si', $aStep['file'])) {
+					$bValidRequest = true;
+					break;
+				}
+			}
+		}else {
+			$bValidRequest = true;
+		}
+		if(!$bValidRequest) {
+			throw new RuntimeException('illegal function request!'); 
+		}
 		$aRetval = array();
 		$sSetupFile = dirname(dirname(__FILE__)).'/setup.ini.php';
 		if(is_readable($sSetupFile)) {
@@ -123,7 +138,7 @@
 				            . $db['host'].($db['port'] != '' ? ':'.$db['port'] : '').'/'.$db['name'];
 			}
 			unset($db, $aCfg);
-			return $sRetval;
+			return $aRetval;
 		}
 		throw new RuntimeException('unable to read setup.ini.php');
 	}
@@ -176,9 +191,9 @@
 // Create global database instance ---
 	$database = WbDatabase::getInstance();
 	if($sDbConnectType == 'dsn') {
-		$database->doConnect($aSqlData[0], $aSqlData[1]['user'], $aSqlData[1]['pass'], $aSqlData[2]);
+		$bTmp = $database->doConnect($aSqlData[0], $aSqlData[1]['user'], $aSqlData[1]['pass'], $aSqlData[2]);
 	}else {
-		$database->doConnect($aSqlData[0], TABLE_PREFIX);
+		$bTmp = $database->doConnect($aSqlData[0], TABLE_PREFIX);
 	}
 	unset($aSqlData);
 // load global settings from database and define global consts from ---
@@ -204,6 +219,7 @@
 					$iTmp = (intval(octdec($aSetting['value'])) |0711);
 					define('OCTAL_DIR_MODE', $iTmp);
 					define('STRING_DIR_MODE', sprintf('0%03o', $iTmp));
+					break;
 				case 'PAGES_DIRECTORY':
 					// sanitize pages_directory
 					$sTmp = trim($aSetting['value'], '/');
@@ -211,7 +227,7 @@
 					define('PAGES_DIRECTORY', $sTmp);
 					break;
 				default: // make global const from setting
-					@define($aSetting['name'], $aSetting['value']);
+					@define($sSettingName, $aSetting['value']);
 					break;
 			endswitch;
 		}
@@ -303,4 +319,4 @@
 										 (defined('LANGUAGE') ? LANGUAGE : '') 
 										);
 // *** END OF FILE ***********************************************************************
-	
\ No newline at end of file
+ 
\ No newline at end of file
