diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-03-10 17:00:09 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-03-10 17:00:09 +0100 |
commit | 41f814515e2396e236eb7b59714cc27eccd230de (patch) | |
tree | 47f0ab4da2c0d7258ec05adf2f3081ce23cd1235 /lib | |
parent | a074adb2af2a72a5f122435bece7b8f5c2850ca4 (diff) | |
parent | 23eeb898a97933ebb61b5e325c8ab99a2e3c1596 (diff) | |
download | nextcloud-server-41f814515e2396e236eb7b59714cc27eccd230de.tar.gz nextcloud-server-41f814515e2396e236eb7b59714cc27eccd230de.zip |
Merge branch 'master' into close-session-faster-master
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/api.php | 23 | ||||
-rw-r--r-- | lib/private/files/cache/homecache.php | 2 |
2 files changed, 13 insertions, 12 deletions
diff --git a/lib/private/api.php b/lib/private/api.php index 3f96196e6df..1537cc11dd0 100644 --- a/lib/private/api.php +++ b/lib/private/api.php @@ -270,6 +270,18 @@ class OC_API { * @return string|false (username, or false on failure) */ private static function loginUser(){ + + // reuse existing login + $loggedIn = OC_User::isLoggedIn(); + $ocsApiRequest = isset($_SERVER['HTTP_OCS_APIREQUEST']) ? $_SERVER['HTTP_OCS_APIREQUEST'] === 'true' : false; + if ($loggedIn === true && $ocsApiRequest) { + + // initialize the user's filesystem + \OC_Util::setUpFS(\OC_User::getUser()); + + return OC_User::getUser(); + } + // basic auth $authUser = isset($_SERVER['PHP_AUTH_USER']) ? $_SERVER['PHP_AUTH_USER'] : ''; $authPw = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : ''; @@ -283,17 +295,6 @@ class OC_API { return $authUser; } - // reuse existing login - $loggedIn = OC_User::isLoggedIn(); - $ocsApiRequest = isset($_SERVER['HTTP_OCS_APIREQUEST']) ? $_SERVER['HTTP_OCS_APIREQUEST'] === 'true' : false; - if ($loggedIn === true && $ocsApiRequest) { - - // initialize the user's filesystem - \OC_Util::setUpFS(\OC_User::getUser()); - - return OC_User::getUser(); - } - return false; } diff --git a/lib/private/files/cache/homecache.php b/lib/private/files/cache/homecache.php index 2af5b03c6e1..82f31d0867d 100644 --- a/lib/private/files/cache/homecache.php +++ b/lib/private/files/cache/homecache.php @@ -16,7 +16,7 @@ class HomeCache extends Cache { * @return int */ public function calculateFolderSize($path) { - if ($path !== '/' and $path !== '' and $path !== 'files') { + if ($path !== '/' and $path !== '' and $path !== 'files' and $path !== 'files_trashbin') { return parent::calculateFolderSize($path); } |