mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
pass logger to view and controller
This commit is contained in:
parent
d96cae4864
commit
23b9def5c8
|
@ -30,7 +30,7 @@ class Controller {
|
|||
* @return object an object of a class implementing the view
|
||||
*/
|
||||
static function factory($class, $params=array()) { /* {{{ */
|
||||
global $settings, $session, $extMgr, $request;
|
||||
global $settings, $session, $extMgr, $request, $logger;
|
||||
if(!$class) {
|
||||
return null;
|
||||
}
|
||||
|
@ -58,6 +58,7 @@ class Controller {
|
|||
$controller->setParam('session', $session);
|
||||
$controller->setParam('request', $request);
|
||||
$controller->setParam('settings', $settings);
|
||||
$controller->setParam('logger', $logger);
|
||||
return $controller;
|
||||
}
|
||||
return null;
|
||||
|
|
|
@ -45,7 +45,7 @@ class UI extends UI_Default {
|
|||
* @return object an object of a class implementing the view
|
||||
*/
|
||||
static function factory($theme, $class='', $params=array()) { /* {{{ */
|
||||
global $settings, $session, $extMgr, $request;
|
||||
global $settings, $session, $extMgr, $request, $logger;
|
||||
if(!$class) {
|
||||
$class = 'Bootstrap';
|
||||
$class = 'Style';
|
||||
|
@ -133,6 +133,7 @@ class UI extends UI_Default {
|
|||
$view->setParam('class', $class);
|
||||
$view->setParam('session', $session);
|
||||
$view->setParam('request', $request);
|
||||
$view->setParam('logger', $logger);
|
||||
// $view->setParam('settings', $settings);
|
||||
$view->setParam('sitename', $settings->_siteName);
|
||||
$view->setParam('rootfolderid', $settings->_rootFolderID);
|
||||
|
|
Loading…
Reference in New Issue
Block a user