diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-02-24 14:10:19 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-02-24 23:54:38 +0100 |
commit | 9f5bce81b037624099012038f1ebfeb94d3317fd (patch) | |
tree | e8917f2547939a1d9b991aa548972990fe323392 /settings/ajax/setquota.php | |
parent | e039015ca1d600a227b4cd0665192f3e22f3d1f2 (diff) | |
download | nextcloud-server-9f5bce81b037624099012038f1ebfeb94d3317fd.tar.gz nextcloud-server-9f5bce81b037624099012038f1ebfeb94d3317fd.zip |
add a default user quota
Diffstat (limited to 'settings/ajax/setquota.php')
-rw-r--r-- | settings/ajax/setquota.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/settings/ajax/setquota.php b/settings/ajax/setquota.php index d4e3c58ac11..7bfc65102c1 100644 --- a/settings/ajax/setquota.php +++ b/settings/ajax/setquota.php @@ -8,8 +8,14 @@ OC_JSON::checkAdminUser(); $username = $_POST["username"]; //make sure the quota is in the expected format -$quota= OC_Helper::computerFileSize($_POST["quota"]); -$quota=OC_Helper::humanFileSize($quota); +$quota=$_POST["quota"]; +if($quota!='none' and $quota!='default'){ + $quota= OC_Helper::computerFileSize($quota); + $quota=OC_Helper::humanFileSize($quota); +} +if($quota==0){ + $quota='default'; +} // Return Success story OC_Preferences::setValue($username,'files','quota',$quota); |