Within OC:init() the minimum set of apps is loaded - which is filesystem, authentication and logging

This commit is contained in:
Thomas Müller 2014-02-06 11:34:27 +01:00
parent 0db5fead8e
commit 79fc4f3126
4 changed files with 5 additions and 21 deletions

View File

@ -22,12 +22,6 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>. * License along with this library. If not, see <http://www.gnu.org/licenses/>.
* *
*/ */
// load needed apps
$RUNTIME_APPTYPES = array('filesystem', 'authentication', 'logging');
OC_App::loadApps($RUNTIME_APPTYPES);
OC_Util::obEnd();
// Backends // Backends
$authBackend = new OC_Connector_Sabre_Auth(); $authBackend = new OC_Connector_Sabre_Auth();

View File

@ -48,7 +48,6 @@ class Report extends Command {
} }
private function countUsers() { private function countUsers() {
\OC_App::loadApps(array('authentication'));
$userManager = \OC::$server->getUserManager(); $userManager = \OC::$server->getUserManager();
return $userManager->countUsers(); return $userManager->countUsers();
} }

View File

@ -567,15 +567,9 @@ class OC {
OC_User::logout(); OC_User::logout();
} }
// Load Apps // Load minimum set of apps - which is filesystem, authentication and logging
// This includes plugins for users and filesystems as well
global $RUNTIME_APPTYPES;
if (!self::checkUpgrade(false)) { if (!self::checkUpgrade(false)) {
if ($RUNTIME_APPTYPES) { OC_App::loadApps(array('filesystem', 'authentication', 'logging'));
OC_App::loadApps($RUNTIME_APPTYPES);
} else {
OC_App::loadApps();
}
} }
//setup extra user backends //setup extra user backends
@ -866,7 +860,7 @@ class OC {
) { ) {
return false; return false;
} }
OC_App::loadApps(array('authentication'));
if (defined("DEBUG") && DEBUG) { if (defined("DEBUG") && DEBUG) {
OC_Log::write('core', 'Trying to login from cookie', OC_Log::DEBUG); OC_Log::write('core', 'Trying to login from cookie', OC_Log::DEBUG);
} }
@ -938,7 +932,7 @@ class OC {
) { ) {
return false; return false;
} }
OC_App::loadApps(array('authentication'));
if (OC_User::login($_SERVER["PHP_AUTH_USER"], $_SERVER["PHP_AUTH_PW"])) { if (OC_User::login($_SERVER["PHP_AUTH_USER"], $_SERVER["PHP_AUTH_PW"])) {
//OC_Log::write('core',"Logged in with HTTP Authentication", OC_Log::DEBUG); //OC_Log::write('core',"Logged in with HTTP Authentication", OC_Log::DEBUG);
OC_User::unsetMagicInCookie(); OC_User::unsetMagicInCookie();
@ -967,4 +961,3 @@ if (!function_exists('get_temp_dir')) {
} }
OC::init(); OC::init();

View File

@ -317,8 +317,6 @@ class OC_User {
*/ */
public static function isLoggedIn() { public static function isLoggedIn() {
if (\OC::$session->get('user_id') && self::$incognitoMode === false) { if (\OC::$session->get('user_id') && self::$incognitoMode === false) {
OC_App::loadApps(array('authentication'));
self::setupBackends();
return self::userExists(\OC::$session->get('user_id')); return self::userExists(\OC::$session->get('user_id'));
} }
return false; return false;