Make OC::loadfile and OC::loadapp protected, only used in OC::handleRequest
This commit is contained in:
parent
0973969386
commit
e3c732040b
10
lib/base.php
10
lib/base.php
|
@ -257,7 +257,7 @@ class OC{
|
||||||
session_start();
|
session_start();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function loadapp() {
|
protected static function loadapp() {
|
||||||
if(file_exists(OC_App::getAppPath(OC::$REQUESTEDAPP) . '/index.php')) {
|
if(file_exists(OC_App::getAppPath(OC::$REQUESTEDAPP) . '/index.php')) {
|
||||||
require_once(OC_App::getAppPath(OC::$REQUESTEDAPP) . '/index.php');
|
require_once(OC_App::getAppPath(OC::$REQUESTEDAPP) . '/index.php');
|
||||||
}
|
}
|
||||||
|
@ -266,7 +266,7 @@ class OC{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function loadfile() {
|
protected static function loadfile() {
|
||||||
$app = OC::$REQUESTEDAPP;
|
$app = OC::$REQUESTEDAPP;
|
||||||
$file = OC::$REQUESTEDFILE;
|
$file = OC::$REQUESTEDFILE;
|
||||||
$app_path = OC_App::getAppPath($app);
|
$app_path = OC_App::getAppPath($app);
|
||||||
|
@ -435,7 +435,7 @@ class OC{
|
||||||
}
|
}
|
||||||
if(!OC_User::isLoggedIn() && substr(OC::$REQUESTEDFILE,-3) == 'css') {
|
if(!OC_User::isLoggedIn() && substr(OC::$REQUESTEDFILE,-3) == 'css') {
|
||||||
OC_App::loadApps();
|
OC_App::loadApps();
|
||||||
OC::loadfile();
|
self::loadfile();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// Someone is logged in :
|
// Someone is logged in :
|
||||||
|
@ -446,9 +446,9 @@ class OC{
|
||||||
header("Location: ".OC::$WEBROOT.'/');
|
header("Location: ".OC::$WEBROOT.'/');
|
||||||
}else{
|
}else{
|
||||||
if(is_null(OC::$REQUESTEDFILE)) {
|
if(is_null(OC::$REQUESTEDFILE)) {
|
||||||
OC::loadapp();
|
self::loadapp();
|
||||||
}else{
|
}else{
|
||||||
OC::loadfile();
|
self::loadfile();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue