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

Commit f00c4b2

Browse files
committed
BUG: refs #0377. Passing numbers in scientific notation to javascript fails
1 parent f78ceae commit f00c4b2

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

modules/sizequota/Notification.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function getSimpleuploadExtraHtml($args)
8787
}
8888
else
8989
{
90-
$freeSpace = $quota->getQuota() - $folderModel->getSize($rootFolder);
90+
$freeSpace = number_format($quota->getQuota() - $folderModel->getSize($rootFolder), 0, '.', '');
9191
return '<div id="sizequotaFreeSpace" style="display:none;">'.$freeSpace.'</div>';
9292
}
9393
}

modules/sizequota/controllers/ConfigController.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ public function folderAction()
117117
$formArray['quota']->setValue($currentQuota->getQuota());
118118
$this->view->quota = $currentQuota->getQuota();
119119
}
120-
$usedSpace = $this->Folder->getSize($folder);
121-
$this->view->usedSpace = $usedSpace[0]->size;
120+
$this->view->usedSpace = $this->Folder->getSize($folder);
122121
$this->view->hUsedSpace = UtilityComponent::formatSize($this->view->usedSpace);
123122
if($this->view->quota == '')
124123
{
@@ -189,7 +188,7 @@ public function getfreespaceAction()
189188
}
190189
else
191190
{
192-
$freeSpace = $quota->getQuota() - $this->Folder->getSize($rootFolder);
191+
$freeSpace = number_format($quota->getQuota() - $this->Folder->getSize($rootFolder), 0, '.', '');
193192
}
194193
echo JsonComponent::encode(array('status' => true, 'freeSpace' => $freeSpace));
195194
}

0 commit comments

Comments
 (0)