1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-06-26 03:30:48 +03:00
This commit is contained in:
Mzhelskiy Maxim 2010-01-05 10:38:22 +00:00
parent 5c45be5788
commit edfa7c0696
3 changed files with 7 additions and 2 deletions

View file

@ -45,6 +45,7 @@ abstract class ActionPlugin extends Action {
/**
* Проверяем в списке шаблонов
*/
$aMatches[1]=strtolower($aMatches[1]);
$sTemplateName=in_array(Config::Get('view.skin'),array_map('basename',glob(Config::Get('path.root.server').'/classes/plugins/'.$aMatches[1].'/templates/skin/*',GLOB_ONLYDIR)))
? Config::Get('view.skin')
: 'default';

View file

@ -150,7 +150,11 @@ class LsPlugin extends Module {
*/
$aPlugins=@file($this->sPluginsDir.self::PLUGIN_ACTIVATION_FILE);
if(is_array($aPlugins)) $aPlugins = array_unique($aPlugins);
if(is_array($aPlugins)) {
$aPlugins = array_unique($aPlugins);
} else {
$aPlugins=array();
}
return $aPlugins;
}

View file

@ -450,7 +450,7 @@ class LsViewer extends Module {
/**
* Считаем что тип не определен
*/
throw new Exception('Can not find the block`s template: '.($sPlugin)?$this->ReplacePluginSkinName($sName,$sPlugin):$sName);
throw new Exception('Can not find the block`s template: '.$sName);
return 'undefined';
}
}