summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorGeorg Ehrke <dev@georgswebsite.de>2012-04-26 14:52:55 +0200
committerGeorg Ehrke <dev@georgswebsite.de>2012-04-26 14:52:55 +0200
commit3f64eb25ab89964127681a52265207dbeb7e1e9b (patch)
tree183f713b4d443f77b5d5bd05350ce069eecb79f0 /lib/base.php
parentb75f680b8e560be82f5c63bfc5480452a3de12d9 (diff)
downloadnextcloud-server-3f64eb25ab89964127681a52265207dbeb7e1e9b.tar.gz
nextcloud-server-3f64eb25ab89964127681a52265207dbeb7e1e9b.zip
some fixes fore movable apps
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/base.php b/lib/base.php
index c8a99d3ac30..bb6dc3d8d70 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -279,13 +279,24 @@ class OC{
if(file_exists(OC::$APPSROOT . '/apps/' . OC::$REQUESTEDAPP)){
require_once(OC::$APPSROOT . '/apps/' . OC::$REQUESTEDAPP . '/index.php');
}else{
- trigger_error('The requested App was not found.', E_USER_ERROR);
+ trigger_error('The requested App was not found.', E_USER_ERROR);//load default app instead?
}
}
public static function loadfile(){
if(file_exists(OC::$APPSROOT . '/apps/' . OC::$REQUESTEDAPP . '/' . OC::$REQUESTEDFILE)){
- require_once(OC::$APPSROOT . '/apps/' . OC::$REQUESTEDAPP . '/' . OC::$REQUESTEDFILE);
+ if(substr(OC::$REQUESTEDFILE, -3) == 'css'){
+ $appswebroot = (string) OC::$APPSWEBROOT;
+ $webroot = (string) OC::$WEBROOT;
+ $cssfile = file_get_contents(OC::$APPSROOT . '/apps/' . OC::$REQUESTEDAPP . '/' . OC::$REQUESTEDFILE);
+ $cssfile = str_replace('%appswebroot%', $appswebroot, $cssfile);
+ $cssfile = str_replace('%webroot%', $webroot, $cssfile);
+ header('Content-Type: text/css');
+ echo $cssfile;
+ exit;
+ }elseif(substr(OC::$REQUESTEDFILE, -3) == 'php'){
+ require_once(OC::$APPSROOT . '/apps/' . OC::$REQUESTEDAPP . '/' . OC::$REQUESTEDFILE);
+ }
}else{
header('HTTP/1.0 404 Not Found');
exit;