From 0f7fdd414896ddfd1a5cd600d982f38c2b926ed8 Mon Sep 17 00:00:00 2001
From: Brice Maron <brice@bmaron.net>
Date: Thu, 7 Jun 2012 19:15:31 +0000
Subject: [PATCH] ReAdd possibility to load existing app folders

---
 lib/base.php | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/base.php b/lib/base.php
index 0d205c8f78..9f2925fa31 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -173,6 +173,11 @@ class OC{
 				}
 				OC::$APPSROOTS[] = array('path'=> $path, 'web' => $web_a[$k]);
 			}
+		}elseif(file_exists(OC::$SERVERROOT.'/apps')){
+			OC::$APPSROOTS[] = array('path'=> OC::$SERVERROOT.'/apps', 'web' => OC::$WEBROOT.'/apps/');
+		}elseif(file_exists(OC::$SERVERROOT.'/../apps')){
+			OC::$APPSROOTS[] = array('path'=> rtrim(dirname(OC::$SERVERROOT), '/').'/apps', 'web' => rtrim(dirname(OC::$WEBROOT), '/').'/apps/');
+			OC::$APPSROOT=rtrim(dirname(OC::$SERVERROOT), '/');
 		}
 
 		if(empty(OC::$APPSROOTS)){
-- 
GitLab