diff --git a/apps/contacts/ajax/importaddressbook.php b/apps/contacts/ajax/importaddressbook.php index bc02e814f5..66cfa4f8af 100755 --- a/apps/contacts/ajax/importaddressbook.php +++ b/apps/contacts/ajax/importaddressbook.php @@ -6,7 +6,6 @@ * See the COPYING-README file. */ -require_once('../../../lib/base.php'); OCP\JSON::checkLoggedIn(); OCP\App::checkAppEnabled('contacts'); $upload_max_filesize = OCP\Util::computerFileSize(ini_get('upload_max_filesize')); diff --git a/apps/contacts/ajax/uploadimport.php b/apps/contacts/ajax/uploadimport.php index 947d4670a2..99386516f5 100755 --- a/apps/contacts/ajax/uploadimport.php +++ b/apps/contacts/ajax/uploadimport.php @@ -19,8 +19,6 @@ * License along with this library. If not, see . * */ -// Init owncloud -require_once('../../../lib/base.php'); // Check if we are a user OCP\JSON::checkLoggedIn(); diff --git a/apps/contacts/import.php b/apps/contacts/import.php index 346db5924c..2386a1cff9 100755 --- a/apps/contacts/import.php +++ b/apps/contacts/import.php @@ -28,7 +28,7 @@ if(!$file) { OCP\JSON::error(array('message' => 'Import file was empty.')); exit(); } -error_log('File: '.$file); + if(isset($_POST['method']) && $_POST['method'] == 'new'){ $id = OC_Contacts_Addressbook::add(OCP\USER::getUser(), $_POST['addressbookname']); OC_Contacts_Addressbook::setActive($id, 1);