В СMS2 нет этих глобальных переменных

This commit is contained in:
Anatoly 2017-05-18 12:23:28 +03:00
parent 538239a6c4
commit a83f70422c
3 changed files with 27 additions and 9 deletions

View file

@ -49,10 +49,14 @@ class View_Page extends View_View
{
//$result = phptal_component($match, $offset);
//*
global $db, $registry; // Нужно как-то передавать параметры
$component = Controller_Component::loadComponent($match, $db, $registry);
if(class_exists("Controller_Site")){ //Если мы в CMS2
$component = Controller_Site::loadComponent($match);
}else{
global $db, $registry; //
$component = Controller_Component::loadComponent($match, $db, $registry);
}
$req = new HttpRequest();
unset($req['active_page']);