use view classes from extension only if enabled

This commit is contained in:
Uwe Steinmann 2015-07-22 07:08:22 +02:00
parent 6060f1e98e
commit dc092daa8f

View File

@ -57,17 +57,19 @@ class UI extends UI_Default {
*/
$filename = '';
foreach($EXT_CONF as $extname=>$extconf) {
$filename = $settings->_rootDir.'ext/'.$extname.'/views/'.$theme."/class.".$class.".php";
if(file_exists($filename)) {
break;
}
$filename = '';
if(isset($extconf['views'][$class])) {
$filename = $settings->_rootDir.'ext/'.$extname.'/views/'.$theme."/".$extconf['views'][$class]['file'];
if(!isset($extconf['disable']) || $extconf['disable'] == false) {
$filename = $settings->_rootDir.'ext/'.$extname.'/views/'.$theme."/class.".$class.".php";
if(file_exists($filename)) {
$classname = $extconf['views'][$class]['name'];
break;
}
$filename = '';
if(isset($extconf['views'][$class])) {
$filename = $settings->_rootDir.'ext/'.$extname.'/views/'.$theme."/".$extconf['views'][$class]['file'];
if(file_exists($filename)) {
$classname = $extconf['views'][$class]['name'];
break;
}
}
}
}
if(!$filename)