Contacts: Fixed paths in import.

remotes/origin/stable4
Thomas Tanghus 14 years ago
parent cbee0d3128
commit 5be9084c73
  1. 1
      apps/contacts/ajax/importaddressbook.php
  2. 2
      apps/contacts/ajax/uploadimport.php
  3. 2
      apps/contacts/import.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'));

@ -19,8 +19,6 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
// Init owncloud
require_once('../../../lib/base.php');
// Check if we are a user
OCP\JSON::checkLoggedIn();

@ -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);

Loading…
Cancel
Save