diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-09-02 20:01:34 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-09-02 20:01:34 +0200 |
commit | e5fec4df0c98f1fb28c48284b88be2dbfb9460e1 (patch) | |
tree | ceace1ceb3f38fb0fa39c7d5598b2cd5ed833cfc | |
parent | 90f66e0f8dd3be1133c89a61ba09a8c3e0de7d07 (diff) | |
parent | 3c618a0252384da7c7aef3ecfd8034e1fe559efd (diff) | |
download | nextcloud-server-e5fec4df0c98f1fb28c48284b88be2dbfb9460e1.tar.gz nextcloud-server-e5fec4df0c98f1fb28c48284b88be2dbfb9460e1.zip |
Merge pull request #10697 from owncloud/fs-no-autosetup
Don't automatically setup the filesystem the moment we load OC\Files\Filesystem
-rw-r--r-- | apps/files_encryption/appinfo/app.php | 16 | ||||
-rw-r--r-- | lib/base.php | 2 | ||||
-rw-r--r-- | lib/private/files/filesystem.php | 2 | ||||
-rw-r--r-- | lib/private/user.php | 6 |
4 files changed, 7 insertions, 19 deletions
diff --git a/apps/files_encryption/appinfo/app.php b/apps/files_encryption/appinfo/app.php index a90f618e245..922d9885164 100644 --- a/apps/files_encryption/appinfo/app.php +++ b/apps/files_encryption/appinfo/app.php @@ -35,22 +35,6 @@ if (!OC_Config::getValue('maintenance', false)) { if(!in_array('crypt', stream_get_wrappers())) { stream_wrapper_register('crypt', 'OCA\Encryption\Stream'); } - - // check if we are logged in - if (OCP\User::isLoggedIn()) { - - // ensure filesystem is loaded - if (!\OC\Files\Filesystem::$loaded) { - \OC_Util::setupFS(); - } - - $view = new OC\Files\View('/'); - - $sessionReady = OCA\Encryption\Helper::checkRequirements(); - if($sessionReady) { - $session = new \OCA\Encryption\Session($view); - } - } } else { // logout user if we are in maintenance to force re-login OCP\User::logout(); diff --git a/lib/base.php b/lib/base.php index 176f799f94d..1a99835040a 100644 --- a/lib/base.php +++ b/lib/base.php @@ -721,6 +721,7 @@ class OC { OC_App::loadApps(); } self::checkSingleUserMode(); + OC_Util::setupFS(); OC::$server->getRouter()->match(OC_Request::getRawPathInfo()); return; } catch (Symfony\Component\Routing\Exception\ResourceNotFoundException $e) { @@ -776,6 +777,7 @@ class OC { if (OC_User::isLoggedIn()) { OC_App::loadApps(); OC_User::setupBackends(); + OC_Util::setupFS(); if (isset($_GET["logout"]) and ($_GET["logout"])) { OC_JSON::callCheck(); if (isset($_COOKIE['oc_token'])) { diff --git a/lib/private/files/filesystem.php b/lib/private/files/filesystem.php index 1dbe66143ac..db46bcfd1ea 100644 --- a/lib/private/files/filesystem.php +++ b/lib/private/files/filesystem.php @@ -794,5 +794,3 @@ class Filesystem { return self::$defaultInstance->getETag($path); } } - -\OC_Util::setupFS(); diff --git a/lib/private/user.php b/lib/private/user.php index c9b1522f85a..509a7c71209 100644 --- a/lib/private/user.php +++ b/lib/private/user.php @@ -232,7 +232,11 @@ class OC_User { */ public static function login($uid, $password) { session_regenerate_id(true); - return self::getUserSession()->login($uid, $password); + $result = self::getUserSession()->login($uid, $password); + if ($result) { + OC_Util::setupFS($uid); + } + return $result; } /** |