Skip to content
Snippets Groups Projects
Commit ebcaa464 authored by Georg Ehrke's avatar Georg Ehrke
Browse files

fix loading of css files that are core related

parent 3f64eb25
Branches
No related tags found
No related merge requests found
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<?php endforeach; ?> <?php endforeach; ?>
<script type="text/javascript"> <script type="text/javascript">
var oc_webroot = '<?php echo OC::$WEBROOT; ?>'; var oc_webroot = '<?php echo OC::$WEBROOT; ?>';
var oc_appswebroot = '<?php echo OC::$APPSWEBROOT; ?>';
</script> </script>
<?php foreach($_['jsfiles'] as $jsfile): ?> <?php foreach($_['jsfiles'] as $jsfile): ?>
<script type="text/javascript" src="<?php echo $jsfile; ?>"></script> <script type="text/javascript" src="<?php echo $jsfile; ?>"></script>
......
...@@ -323,11 +323,11 @@ class OC_Template{ ...@@ -323,11 +323,11 @@ class OC_Template{
*/ */
public function appendIfExist($type, $root, $web, $file) { public function appendIfExist($type, $root, $web, $file) {
if (is_file($root.'/'.$file)) { if (is_file($root.'/'.$file)) {
if($type == 'cssfiles' && $root == OC::$APPSROOT){
$pathes = explode('/', $file); $pathes = explode('/', $file);
$app = $pathes['1']; if($type == 'cssfiles' && $root == OC::$APPSROOT && $pathes[0] == 'apps'){
unset($pathes['0']); $app = $pathes[1];
unset($pathes['1']); unset($pathes[0]);
unset($pathes[1]);
$path = implode('/', $pathes); $path = implode('/', $pathes);
$this->append( $type, OC_Helper::linkTo($app, $path)); $this->append( $type, OC_Helper::linkTo($app, $path));
}else{ }else{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment