1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2025-01-30 19:52:17 +01:00

Contacts: Use OCP\Util::maxUploadFilesize('/').

This commit is contained in:
Thomas Tanghus 2013-03-14 19:06:28 +01:00
parent d7a47af586
commit 40a069760c

View File

@ -29,13 +29,7 @@ foreach($ims as $name => $values) {
$im_protocols[$name] = $values['displayname'];
}
$upload_max_filesize = \OCP\Util::computerFileSize(ini_get('upload_max_filesize'));
$post_max_size = \OCP\Util::computerFileSize(ini_get('post_max_size'));
$maxUploadFilesize = min($upload_max_filesize, $post_max_size);
$freeSpace=\OC\Files\Filesystem::free_space('/');
$freeSpace=max($freeSpace, 0);
$maxUploadFilesize = min($maxUploadFilesize, $freeSpace);
$maxUploadFilesize = OCP\Util::maxUploadFilesize('/');
\OCP\Util::addscript('', 'multiselect');
\OCP\Util::addscript('', 'jquery.multiselect');