Merge branch 'seeddms-5.0.x' into seeddms-5.1.x

This commit is contained in:
Uwe Steinmann 2017-02-22 13:22:39 +01:00
commit 7fd7d0c7e2
2 changed files with 6 additions and 2 deletions

View File

@ -56,16 +56,19 @@ class UI extends UI_Default {
* to rootDir or an extension dir if it has set the include path
*/
$filename = '';
$httpbasedir = '';
foreach($EXT_CONF as $extname=>$extconf) {
if(!isset($extconf['disable']) || $extconf['disable'] == false) {
$filename = $settings->_rootDir.'ext/'.$extname.'/views/'.$theme."/class.".$class.".php";
if(file_exists($filename)) {
$httpbasedir = 'ext/'.$extname.'/';
break;
}
$filename = '';
if(isset($extconf['views'][$class])) {
$filename = $settings->_rootDir.'ext/'.$extname.'/views/'.$theme."/".$extconf['views'][$class]['file'];
if(file_exists($filename)) {
$httpbasedir = 'ext/'.$extname.'/';
$classname = $extconf['views'][$class]['name'];
break;
}
@ -81,6 +84,7 @@ class UI extends UI_Default {
$view = new $classname($params, $theme);
/* Set some configuration parameters */
$view->setParam('refferer', $_SERVER['REQUEST_URI']);
$view->setParam('absbaseprefix', $settings->_httpRoot.$httpbasedir);
$view->setParam('class', $class);
$view->setParam('session', $session);
$view->setParam('settings', $settings);

View File

@ -149,12 +149,12 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
parse_str($_SERVER['QUERY_STRING'], $tmp);
$tmp['action'] = 'footerjs';
$tmp['hash'] = $hashjs;
echo '<script src="../out/out.'.$this->params['class'].'.php?'.http_build_query($tmp).'"></script>'."\n";
echo '<script src="'.$this->params['absbaseprefix'].'out/out.'.$this->params['class'].'.php?'.http_build_query($tmp).'"></script>'."\n";
}
if(method_exists($this, 'js')) {
parse_str($_SERVER['QUERY_STRING'], $tmp);
$tmp['action'] = 'js';
echo '<script src="../out/out.'.$this->params['class'].'.php?'.http_build_query($tmp).'"></script>'."\n";
echo '<script src="'.$this->params['absbaseprefix'].'out/out.'.$this->params['class'].'.php?'.http_build_query($tmp).'"></script>'."\n";
}
echo "</body>\n</html>\n";
} /* }}} */