From 2e8531370102b33a072c6b981d2b1e6a1c9cf40e Mon Sep 17 00:00:00 2001
From: Georg Ehrke <dev@georgswebsite.de>
Date: Thu, 19 Apr 2012 22:26:36 +0200
Subject: [PATCH] optimize code

---
 index.php    | 1 +
 lib/base.php | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/index.php b/index.php
index b85c49c76c2..a3835c6d2f3 100644
--- a/index.php
+++ b/index.php
@@ -57,6 +57,7 @@ elseif(OC_User::isLoggedIn()) {
 		exit();
 	}
 	else {
+		OC_App::loadApps();
 		if(is_null(OC::$REQUESTEDFILE)){
 			OC::loadapp();
 		}else{
diff --git a/lib/base.php b/lib/base.php
index 5478f084392..fa5287631d8 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -274,7 +274,6 @@ class OC{
 	
 	public static function loadapp(){
 		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);
-- 
GitLab