2011-08-15 23:06:29 +04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
// Init owncloud
|
|
|
|
require_once('../../lib/base.php');
|
|
|
|
|
2011-09-24 00:22:59 +04:00
|
|
|
OC_JSON::checkAdminUser();
|
2011-08-15 23:06:29 +04:00
|
|
|
|
|
|
|
$username = $_POST["username"];
|
2011-12-14 04:16:14 +04:00
|
|
|
|
|
|
|
//make sure the quota is in the expected format
|
2011-08-15 23:06:29 +04:00
|
|
|
$quota= OC_Helper::computerFileSize($_POST["quota"]);
|
2011-12-14 04:16:14 +04:00
|
|
|
$quota=OC_Helper::humanFileSize($quota);
|
2011-08-15 23:06:29 +04:00
|
|
|
|
|
|
|
// Return Success story
|
|
|
|
OC_Preferences::setValue($username,'files','quota',$quota);
|
2011-12-14 04:16:14 +04:00
|
|
|
OC_JSON::success(array("data" => array( "username" => $username ,'quota'=>$quota)));
|
2011-08-15 23:06:29 +04:00
|
|
|
|
|
|
|
?>
|