pass logger to view and controller

This commit is contained in:
Uwe Steinmann 2024-04-19 17:18:06 +02:00
parent d96cae4864
commit 23b9def5c8
2 changed files with 4 additions and 2 deletions

View File

@ -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;

View File

@ -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);