1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-12-01 13:24:10 +01:00

don't use depricated OC_Filesystem

This commit is contained in:
Robin Appelman 2012-10-10 13:18:05 +02:00
parent 89928d59de
commit 1eabea54ff
3 changed files with 4 additions and 4 deletions

View File

@ -32,7 +32,7 @@ if(!isset($_GET['path'])) {
bailOut(OC_Contacts_App::$l10n->t('No photo path was submitted.'));
}
$localpath = OC_Filesystem::getLocalFile($_GET['path']);
$localpath = \OC\Files\Filesystem::getLocalFile($_GET['path']);
$tmpkey = 'contact-photo-'.$_GET['id'];
if(!file_exists($localpath)) {

View File

@ -32,7 +32,7 @@ if(isset($_POST['fstype']) && $_POST['fstype'] == 'OC_FilesystemView') {
$view = OCP\Files::getStorage('contacts');
$file = $view->file_get_contents('/imports/' . $_POST['file']);
} else {
$file = OC_Filesystem::file_get_contents($_POST['path'] . '/' . $_POST['file']);
$file = \OC\Files\Filesystem::file_get_contents($_POST['path'] . '/' . $_POST['file']);
}
if(!$file) {
OCP\JSON::error(array('data' => array('message' => 'Import file was empty.')));

View File

@ -42,7 +42,7 @@ $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=\OC\Files\Filesystem::free_space('/');
$freeSpace=max($freeSpace, 0);
$maxUploadFilesize = min($maxUploadFilesize, $freeSpace);
@ -71,4 +71,4 @@ $tmpl->assign('categories', $categories, false);
$tmpl->assign('im_protocols', $im_protocols, false);
$tmpl->assign('has_contacts', $has_contacts, false);
$tmpl->assign('id', $id);
$tmpl->printPage();
$tmpl->printPage();