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:
parent
89928d59de
commit
1eabea54ff
@ -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)) {
|
||||
|
@ -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.')));
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user