Skip to content
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.

Commit

Permalink
BUG: refs #0377. Passing numbers in scientific notation to javascript…
Browse files Browse the repository at this point in the history
… fails
  • Loading branch information
zachmullen committed Jan 10, 2012
1 parent f78ceae commit f00c4b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion modules/sizequota/Notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function getSimpleuploadExtraHtml($args)
}
else
{
$freeSpace = $quota->getQuota() - $folderModel->getSize($rootFolder);
$freeSpace = number_format($quota->getQuota() - $folderModel->getSize($rootFolder), 0, '.', '');
return '<div id="sizequotaFreeSpace" style="display:none;">'.$freeSpace.'</div>';
}
}
Expand Down
5 changes: 2 additions & 3 deletions modules/sizequota/controllers/ConfigController.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ public function folderAction()
$formArray['quota']->setValue($currentQuota->getQuota());
$this->view->quota = $currentQuota->getQuota();
}
$usedSpace = $this->Folder->getSize($folder);
$this->view->usedSpace = $usedSpace[0]->size;
$this->view->usedSpace = $this->Folder->getSize($folder);
$this->view->hUsedSpace = UtilityComponent::formatSize($this->view->usedSpace);
if($this->view->quota == '')
{
Expand Down Expand Up @@ -189,7 +188,7 @@ public function getfreespaceAction()
}
else
{
$freeSpace = $quota->getQuota() - $this->Folder->getSize($rootFolder);
$freeSpace = number_format($quota->getQuota() - $this->Folder->getSize($rootFolder), 0, '.', '');
}
echo JsonComponent::encode(array('status' => true, 'freeSpace' => $freeSpace));
}
Expand Down

0 comments on commit f00c4b2

Please sign in to comment.