More dynamic paths

This commit is contained in:
Lucas Bartholemy 2014-02-13 02:45:13 +01:00
parent 9f7a046ed6
commit 4b98e59be8
2 changed files with 2 additions and 5 deletions

View File

@ -53,7 +53,7 @@ class HTheme extends CTheme {
*/
public static function getThemes() {
$themes = array();
$themePath = Yii::getPathOfAlias('webroot') . DIRECTORY_SEPARATOR . "themes";
$themePath = Yii::app()->themeManager->getBasePath();
foreach (scandir($themePath) as $file) {
if ($file == "." || $file == ".." || !is_dir($themePath . DIRECTORY_SEPARATOR . $file)) {

View File

@ -27,9 +27,7 @@
class InstallerModule extends CWebModule {
public function init() {
//set layout
$this->layoutPath = "protected/modules_core/installer/views/";
$this->setLayoutPath(Yii::getPathOfAlias('installer.views'));
}
/**
@ -45,7 +43,6 @@ class InstallerModule extends CWebModule {
return true;
$success = true;
} catch (Exception $e) {
}
return false;