diff options
author | Georg Ehrke <dev@georgswebsite.de> | 2012-04-19 16:44:49 +0200 |
---|---|---|
committer | Georg Ehrke <dev@georgswebsite.de> | 2012-04-19 16:44:49 +0200 |
commit | 85019887dfed3762025d3fc936a61f085ab4e440 (patch) | |
tree | 2b7c65465b648e368b4561da9bcfe9d18d7e7e47 /lib | |
parent | 3fb91a74112c00457d549c79d6908acdd32651c5 (diff) | |
download | nextcloud-server-85019887dfed3762025d3fc936a61f085ab4e440.tar.gz nextcloud-server-85019887dfed3762025d3fc936a61f085ab4e440.zip |
add loading of files
Diffstat (limited to 'lib')
-rw-r--r-- | lib/base.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/base.php b/lib/base.php index c21ab973593..2924a1da182 100644 --- a/lib/base.php +++ b/lib/base.php @@ -276,6 +276,17 @@ class OC{ if(file_exists(OC::$APPSROOT . '/apps/' . OC::$REQUESTEDAPP)){ OC_App::loadApps(); require_once(OC::$APPSROOT . '/apps/' . OC::$REQUESTEDAPP . '/index.php'); + }else{ + trigger_error('The requested App was not found.', E_USER_ERROR); + } + } + + public static function loadfile(){ + if(file_exists(OC::$APPSROOT . '/apps/' . OC::$REQUESTEDAPP . '/' . OC::$REQUESTEDFILE)){ + OC_App::loadApps(); + require_once(OC::$APPSROOT . '/apps/' . OC::$REQUESTEDAPP . '/' . OC::$REQUESTEDFILE); + }else{ + header('404 Not Found'); } } |