2012-04-23 19:14:10 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Copyright (c) 2012 Georg Ehrke <ownclouddev at georgswebsite dot de>
|
|
|
|
* This file is licensed under the Affero General Public License version 3 or
|
|
|
|
* later.
|
|
|
|
* See the COPYING-README file.
|
|
|
|
*/
|
|
|
|
|
2012-05-03 10:23:29 +00:00
|
|
|
OCP\JSON::checkLoggedIn();
|
2012-05-02 17:08:37 +00:00
|
|
|
OCP\App::checkAppEnabled('contacts');
|
2012-05-01 22:20:45 +00:00
|
|
|
$upload_max_filesize = OCP\Util::computerFileSize(ini_get('upload_max_filesize'));
|
|
|
|
$post_max_size = OCP\Util::computerFileSize(ini_get('post_max_size'));
|
2012-04-23 19:14:10 +00:00
|
|
|
$maxUploadFilesize = min($upload_max_filesize, $post_max_size);
|
|
|
|
|
|
|
|
$freeSpace=OC_Filesystem::free_space('/');
|
|
|
|
$freeSpace=max($freeSpace,0);
|
|
|
|
$maxUploadFilesize = min($maxUploadFilesize ,$freeSpace);
|
|
|
|
|
2012-05-06 21:00:36 +00:00
|
|
|
$tmpl = new OCP\Template('contacts', 'part.importaddressbook');
|
2012-04-23 19:14:10 +00:00
|
|
|
$tmpl->assign('uploadMaxFilesize', $maxUploadFilesize);
|
2012-05-01 22:20:45 +00:00
|
|
|
$tmpl->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize));
|
2012-04-23 19:14:10 +00:00
|
|
|
$tmpl->printpage();
|
|
|
|
?>
|