diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-01-26 18:49:45 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2013-01-26 18:49:45 +0100 |
commit | 930b9b9cd0e60170549485164f33b5fc004d7ca2 (patch) | |
tree | fa966587794f11861e4e46f52957840de6cb4a4a /lib/base.php | |
parent | f85838177596b3214430e750b5425bfe3c0cde86 (diff) | |
parent | c9e25d3fab17b178759dd6d2f9488aa4cf37fbbb (diff) | |
download | nextcloud-server-930b9b9cd0e60170549485164f33b5fc004d7ca2.tar.gz nextcloud-server-930b9b9cd0e60170549485164f33b5fc004d7ca2.zip |
merge master into filesystem
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 48 |
1 files changed, 29 insertions, 19 deletions
diff --git a/lib/base.php b/lib/base.php index dd5eef52fe3..e3baa617c32 100644 --- a/lib/base.php +++ b/lib/base.php @@ -96,7 +96,14 @@ class OC } elseif (strpos($className, 'OCP\\') === 0) { $path = 'public/' . strtolower(str_replace('\\', '/', substr($className, 3)) . '.php'); } elseif (strpos($className, 'OCA\\') === 0) { - $path = 'apps/' . strtolower(str_replace('\\', '/', substr($className, 3)) . '.php'); + foreach(self::$APPSROOTS as $appDir) { + $path = $appDir['path'] . '/' . strtolower(str_replace('\\', '/', substr($className, 3)) . '.php'); + $fullPath = stream_resolve_include_path($path); + if (file_exists($fullPath)) { + require_once $fullPath; + return false; + } + } } elseif (strpos($className, 'Sabre_') === 0) { $path = str_replace('_', '/', $className) . '.php'; } elseif (strpos($className, 'Symfony\\Component\\Routing\\') === 0) { @@ -270,7 +277,7 @@ class OC { // Add the stuff we need always OC_Util::addScript("jquery-1.7.2.min"); - OC_Util::addScript("jquery-ui-1.8.16.custom.min"); + OC_Util::addScript("jquery-ui-1.10.0.custom"); OC_Util::addScript("jquery-showpassword"); OC_Util::addScript("jquery.infieldlabel"); OC_Util::addScript("jquery-tipsy"); @@ -284,8 +291,9 @@ class OC OC_Util::addStyle("styles"); OC_Util::addStyle("multiselect"); - OC_Util::addStyle("jquery-ui-1.8.16.custom"); + OC_Util::addStyle("jquery-ui-1.10.0.custom"); OC_Util::addStyle("jquery-tipsy"); + OC_Util::addScript("oc-requesttoken"); } public static function initSession() @@ -542,22 +550,6 @@ class OC */ public static function handleRequest() { - if (!OC_Config::getValue('installed', false)) { - require_once 'core/setup.php'; - exit(); - } - // Handle redirect URL for logged in users - if (isset($_REQUEST['redirect_url']) && OC_User::isLoggedIn()) { - $location = OC_Helper::makeURLAbsolute(urldecode($_REQUEST['redirect_url'])); - header('Location: ' . $location); - return; - } - // Handle WebDAV - if ($_SERVER['REQUEST_METHOD'] == 'PROPFIND') { - header('location: ' . OC_Helper::linkToRemote('webdav')); - return; - } - // load all the classpaths from the enabled apps so they are available // in the routing files of each app OC::loadAppClassPaths(); @@ -579,6 +571,24 @@ class OC self::loadCSSFile($param); return; } + + if (!OC_Config::getValue('installed', false)) { + require_once 'core/setup.php'; + exit(); + } + + // Handle redirect URL for logged in users + if (isset($_REQUEST['redirect_url']) && OC_User::isLoggedIn()) { + $location = OC_Helper::makeURLAbsolute(urldecode($_REQUEST['redirect_url'])); + header('Location: ' . $location); + return; + } + // Handle WebDAV + if ($_SERVER['REQUEST_METHOD'] == 'PROPFIND') { + header('location: ' . OC_Helper::linkToRemote('webdav')); + return; + } + // Someone is logged in : if (OC_User::isLoggedIn()) { OC_App::loadApps(); |