From: <al...@us...> - 2008-11-21 20:34:04
|
Revision: 782 http://sciret.svn.sourceforge.net/sciret/?rev=782&view=rev Author: alpeb Date: 2008-11-21 20:34:01 +0000 (Fri, 21 Nov 2008) Log Message: ----------- re-added compatibility with older config files Modified Paths: -------------- trunk/index.php Modified: trunk/index.php =================================================================== --- trunk/index.php 2008-11-21 20:23:50 UTC (rev 781) +++ trunk/index.php 2008-11-21 20:34:01 UTC (rev 782) @@ -34,7 +34,36 @@ // use a config.php with an array instead of a cleaner .ini file, because for an easy installation all files // go under the web root, and a .ini file would be browsable -$config = new Zend_Config(require dirname(__FILE__). '/config.php', array('allowModifications' => true)); +$configArray = require dirname(__FILE__). '/config.php'; +if (!is_array($configArray)) { + // config file comes from version previous than 1.9.0 + $configArray = array( + 'environment' => + array ( + 'session_name' => 'SCIRET', + 'production' => true, + 'YDN' => true, + 'loglevel' => 0, + ), + 'general' => + array ( + 'slowdown_secs' => SLOWDOWN_SECS, + 'language_default' => LANGUAGE_DEFAULT, + ), + 'database' => + array ( + 'adapter' => 'mysqli', + 'params' => + array ( + 'host' => DB_HOST, + 'dbname' => DB_NAME, + 'username' => DB_USER, + 'password' => DB_PASSWORD, + ), + ), + ); +} +$config = new Zend_Config($configArray, array('allowModifications' => true)); Zend_Registry::set('config', $config); /************************** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |