Skip to content

Commit 1053986

Browse files
authored
Merge pull request #56780 from nextcloud/jtr/chore-drop-getUserQuota-legacy
chore(legacy): Remove deprecated getUserQuota method
2 parents be8b2bf + 33fba8c commit 1053986

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

lib/private/legacy/OC_Util.php

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -93,24 +93,6 @@ public static function isDefaultExpireDateEnforced() {
9393
return $shareManager->shareApiLinkDefaultExpireDateEnforced();
9494
}
9595

96-
/**
97-
* Get the quota of a user
98-
*
99-
* @param IUser|null $user
100-
* @return int|\OCP\Files\FileInfo::SPACE_UNLIMITED|false|float Quota bytes
101-
* @deprecated 9.0.0 - Use \OCP\IUser::getQuota or \OCP\IUser::getQuotaBytes
102-
*/
103-
public static function getUserQuota(?IUser $user) {
104-
if (is_null($user)) {
105-
return \OCP\Files\FileInfo::SPACE_UNLIMITED;
106-
}
107-
$userQuota = $user->getQuota();
108-
if ($userQuota === 'none') {
109-
return \OCP\Files\FileInfo::SPACE_UNLIMITED;
110-
}
111-
return \OCP\Util::computerFileSize($userQuota);
112-
}
113-
11496
/**
11597
* copies the skeleton to the users /files
11698
*
@@ -297,7 +279,7 @@ public static function addHeader($tag, $attributes, $text = null, $prepend = fal
297279
}
298280

299281
/**
300-
* check if the current server configuration is suitable for ownCloud
282+
* Check if the current server environment configuration is suitable for Nextcloud
301283
*
302284
* @return array arrays with error messages and hints
303285
*/

0 commit comments

Comments
 (0)