fix Путь по умолчанию
This commit is contained in:
parent
fdc13fd6be
commit
b60398acd7
1 changed files with 7 additions and 3 deletions
|
|
@ -133,6 +133,10 @@ class Controller_Component
|
|||
return $tpl;
|
||||
}
|
||||
|
||||
function _getDefaultPath() {
|
||||
return $this->viewPath[count($this->viewPath) - 1];
|
||||
}
|
||||
|
||||
public function getTemplatePath($name) {
|
||||
$registry/*: Settings*/ = $this->registry;
|
||||
// Брать настройки из куков если есть
|
||||
|
|
@ -143,12 +147,12 @@ class Controller_Component
|
|||
}
|
||||
}
|
||||
|
||||
return Path::join($this->viewPath[0], 'templates', 'modern', $name);
|
||||
return Path::join($this->viewPath[count($this->viewPath) - 1], 'templates', 'modern', $name);
|
||||
}
|
||||
|
||||
public function getTemplateWebPath()
|
||||
{
|
||||
return Path::join($this->webPath[0], 'templates', 'modern');
|
||||
return Path::join($this->webPath[count($this->webPath) - 1], 'templates', 'modern');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -181,7 +185,7 @@ class Controller_Component
|
|||
}
|
||||
|
||||
function getInfo() {
|
||||
$filename = Path::join($this->viewPath[0], 'install.json');
|
||||
$filename = Path::join($this->viewPath[count($this->viewPath) - 1], 'install.json');
|
||||
if (file_exists($filename)) {
|
||||
$settings = json_decode(File::getContents($filename), true);
|
||||
return $settings;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue