From: <al...@us...> - 2008-08-20 15:31:34
|
Revision: 616 http://sciret.svn.sourceforge.net/sciret/?rev=616&view=rev Author: alpeb Date: 2008-08-20 15:31:30 +0000 (Wed, 20 Aug 2008) Log Message: ----------- added null log writer when not going to log anything (so that the writable log.txt doesn't have to exist) Modified Paths: -------------- trunk/index.php Modified: trunk/index.php =================================================================== --- trunk/index.php 2008-08-19 22:36:48 UTC (rev 615) +++ trunk/index.php 2008-08-20 15:31:30 UTC (rev 616) @@ -42,8 +42,11 @@ $logger = new Zend_Log(); if ($config->environment->loglevel > 0) { $logger->addWriter(new Zend_Log_Writer_Stream(APP_DIR . '/log.txt')); - $logger->addFilter(new Zend_Log_Filter_Priority((int)$config->environment->loglevel)); +} else { + // this releaves the obligation of having a log.txt file writable by the web server when we won't log anything + $logger->addWriter(new Zend_Log_rriter_Null()); } +$logger->addFilter(new Zend_Log_Filter_Priority((int)$config->environment->loglevel)); Zend_Registry::set('logger', $logger); $logger->log('REQUESTED URI: ' . $_SERVER['REQUEST_URI'], Zend_Log::INFO); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-08-25 14:29:41
|
Revision: 637 http://sciret.svn.sourceforge.net/sciret/?rev=637&view=rev Author: alpeb Date: 2008-08-25 14:29:37 +0000 (Mon, 25 Aug 2008) Log Message: ----------- typo Modified Paths: -------------- trunk/index.php Modified: trunk/index.php =================================================================== --- trunk/index.php 2008-08-25 07:08:35 UTC (rev 636) +++ trunk/index.php 2008-08-25 14:29:37 UTC (rev 637) @@ -44,7 +44,7 @@ $logger->addWriter(new Zend_Log_Writer_Stream(APP_DIR . '/log.txt')); } else { // this releaves the obligation of having a log.txt file writable by the web server when we won't log anything - $logger->addWriter(new Zend_Log_rriter_Null()); + $logger->addWriter(new Zend_Log_Writer_Null()); } $logger->addFilter(new Zend_Log_Filter_Priority((int)$config->environment->loglevel)); Zend_Registry::set('logger', $logger); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-09-24 22:52:03
|
Revision: 700 http://sciret.svn.sourceforge.net/sciret/?rev=700&view=rev Author: alpeb Date: 2008-09-24 22:51:52 +0000 (Wed, 24 Sep 2008) Log Message: ----------- added forms dir, and use ZF's sessions handlig Modified Paths: -------------- trunk/index.php Modified: trunk/index.php =================================================================== --- trunk/index.php 2008-09-24 22:51:12 UTC (rev 699) +++ trunk/index.php 2008-09-24 22:51:52 UTC (rev 700) @@ -21,6 +21,7 @@ dirname(__FILE__).'/libs', dirname(__FILE__).'/classes', dirname(__FILE__).'/models', + dirname(__FILE__).'/forms', dirname(__FILE__).'/modules/default/models', dirname(__FILE__).'/modules/blog/models', dirname(__FILE__).'/actions', @@ -90,10 +91,19 @@ $_GET['view'] = 'NotInstalled'; } +/************************** +/* SESSION +/**************************/ + // ZF still doesn't have facilities for this session_name($config->environment->session_name); -Zend_Session::start(); +$appSession = new Zend_Session_Namespace('Default'); +if (is_null($appSession->messages)) { + $appSession->messages = array(); +} +Zend_Registry::set('appSession', $appSession); + $auth = Zend_Auth::getInstance(); if ($auth->hasIdentity()) { $users = new Users(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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. |