fix loading of css files that are core related

This commit is contained in:
Georg Ehrke 2012-04-26 15:19:27 +02:00
parent 3f64eb25ab
commit ebcaa46482
2 changed files with 6 additions and 5 deletions

View File

@ -9,6 +9,7 @@
<?php endforeach; ?>
<script type="text/javascript">
var oc_webroot = '<?php echo OC::$WEBROOT; ?>';
var oc_appswebroot = '<?php echo OC::$APPSWEBROOT; ?>';
</script>
<?php foreach($_['jsfiles'] as $jsfile): ?>
<script type="text/javascript" src="<?php echo $jsfile; ?>"></script>

View File

@ -323,11 +323,11 @@ class OC_Template{
*/
public function appendIfExist($type, $root, $web, $file) {
if (is_file($root.'/'.$file)) {
if($type == 'cssfiles' && $root == OC::$APPSROOT){
$pathes = explode('/', $file);
$app = $pathes['1'];
unset($pathes['0']);
unset($pathes['1']);
$pathes = explode('/', $file);
if($type == 'cssfiles' && $root == OC::$APPSROOT && $pathes[0] == 'apps'){
$app = $pathes[1];
unset($pathes[0]);
unset($pathes[1]);
$path = implode('/', $pathes);
$this->append( $type, OC_Helper::linkTo($app, $path));
}else{