Commit c823c9b8 authored by Martyn Smith's avatar Martyn Smith Committed by Martyn Smith
Browse files

Fix #510 quota bug

parent 1f061c4a
......@@ -502,6 +502,7 @@ function augment_tags_control(elem, returnContainer) {
function quotaUpdate(quotaused, quota) {
if (! $('quota_percentage') ) {
logWarning('quotaUpdate(', quotaused, quota, ') called but no id="quota_percentage" on page');
return;
}
......@@ -546,20 +547,8 @@ function quotaUpdate(quotaused, quota) {
update(data);
}
else {
var req = getXMLHttpRequest();
req.open('post', config.wwwroot + 'json/quota.php');
req.setRequestHeader('Content-type','application/x-www-form-urlencoded');
var d = sendXMLHttpRequest(req);
processingStart();
d.addCallbacks(
function (data) {
processingStop();
data = evalJSONRequest(data);
update(data);
},
function (error) {
processingStop();
}
);
sendjsonrequest(config.wwwroot + 'json/quota.php', {}, 'POST', function (data) {
update(data);
}, null, true);
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment