nextcloud/apps/contacts/ajax/importaddressbook.php

25 lines
914 B
PHP
Raw Normal View History

<?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 14:23:29 +04:00
OCP\JSON::checkLoggedIn();
2012-05-02 21:08:37 +04:00
OCP\App::checkAppEnabled('contacts');
2012-05-02 02:20:45 +04:00
$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_Filesystem::free_space('/');
$freeSpace=max($freeSpace,0);
$maxUploadFilesize = min($maxUploadFilesize ,$freeSpace);
2012-05-07 01:00:36 +04:00
$tmpl = new OCP\Template('contacts', 'part.importaddressbook');
$tmpl->assign('uploadMaxFilesize', $maxUploadFilesize);
2012-06-25 19:15:33 +04:00
$tmpl->assign('requesttoken', $_SERVER['HTTP_REQUESTTOKEN']);
2012-05-02 02:20:45 +04:00
$tmpl->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize));
$tmpl->printpage();
?>