add loading of files
This commit is contained in:
parent
3fb91a7411
commit
85019887df
2 changed files with 17 additions and 1 deletions
|
@ -57,7 +57,12 @@ elseif(OC_User::isLoggedIn()) {
|
|||
exit();
|
||||
}
|
||||
else {
|
||||
if(is_null(OC::$REQUESTEDFILE)){
|
||||
OC::loadapp();
|
||||
}else{
|
||||
OC::loadfile();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
11
lib/base.php
11
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');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue