From: <pan...@us...> - 2008-09-25 11:08:31
|
Revision: 380 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=380&view=rev Author: panzaboi Date: 2008-09-25 11:08:26 +0000 (Thu, 25 Sep 2008) Log Message: ----------- small fix (enviroment => environment) register ErrorHandler enable Dojo register Router at index -1 Modified Paths: -------------- website/library/Application.php Modified: website/library/Application.php =================================================================== --- website/library/Application.php 2008-09-25 11:06:47 UTC (rev 379) +++ website/library/Application.php 2008-09-25 11:08:26 UTC (rev 380) @@ -2,7 +2,7 @@ class Application { - protected $_enviroment; + protected $_environment; protected static $_approot; protected $_docroot; @@ -78,7 +78,7 @@ $frontController = $this->_setupFrontController(); // Setup Error Handler - $frontController->registerPlugin(new Zend_Controller_Plugin_ErrorHandler(array( + $frontController->registerPlugin(new Ostacium_Controller_Plugin_ErrorHandler(array( 'module' => $_config->auth->noacl->module, 'controller' => $_config->auth->noacl->controller, 'action' => $_config->auth->noacl->action @@ -101,7 +101,7 @@ Zend_Mail::setDefaultTransport($mail); $routerPlugin = new Ostacium_Controller_Plugin_Router($acl, $_config->auth->noauth->toArray(), $_config->auth->noacl->toArray()); - $frontController->registerPlugin($routerPlugin); + $frontController->registerPlugin($routerPlugin, -1); return $frontController; } @@ -152,6 +152,7 @@ $frontController = Zend_Controller_Front::getInstance(); $frontController->throwExceptions((bool) $_config->error->throw); + $frontController->setParam('environment', $this->_environment); $frontController->setControllerDirectory(array( 'default' => $this->_docroot . '/application/default/controllers', 'admin' => $this->_docroot . '/application/admin/controllers', @@ -176,6 +177,9 @@ // Setup Title //$view->placeholder('title')->set($_config->title); $view->headTitle($_config->title)->setSeparator($_config->titlesep); + // Setup Dojo + Zend_Dojo::enableView($view); + $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer($view); Zend_Controller_Action_HelperBroker::addHelper($viewRenderer); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |