]> source.dussan.org Git - nextcloud-server.git/commitdiff
Merge pull request #19781 from nextcloud/quota-include-external-dont-use-current...
authorRobin Appelman <robin@icewind.nl>
Wed, 1 Apr 2020 12:24:21 +0000 (12:24 +0000)
committerGitHub <noreply@github.com>
Wed, 1 Apr 2020 12:24:21 +0000 (12:24 +0000)
Dont always use the current users quota when calculating storage info

1  2 
lib/private/legacy/helper.php
lib/private/legacy/util.php

Simple merge
index 9fce2993a2a5a94654d063fa2789fdb47948e102,9b574993f2c95f0790ccc3da192638e336cbffa8..f14095675dc9d17e2c4fd47d28da1124ce98c581
@@@ -251,10 -251,9 +251,9 @@@ class OC_Util 
                        ) {
                                /** @var \OC\Files\Storage\Home $storage */
                                if (is_object($storage->getUser())) {
-                                       $user = $storage->getUser()->getUID();
-                                       $quota = OC_Util::getUserQuota($user);
+                                       $quota = OC_Util::getUserQuota($storage->getUser());
                                        if ($quota !== \OCP\Files\FileInfo::SPACE_UNLIMITED) {
 -                                              return new \OC\Files\Storage\Wrapper\Quota(array('storage' => $storage, 'quota' => $quota, 'root' => 'files'));
 +                                              return new \OC\Files\Storage\Wrapper\Quota(['storage' => $storage, 'quota' => $quota, 'root' => 'files']);
                                        }
                                }
                        }