From f67d18b894adee67c7cf72b3d3039c8c1c823a7a Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Sat, 18 May 2013 00:08:23 +0200 Subject: [PATCH] Return status on partially imported vcards --- lib/controller/importcontroller.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/controller/importcontroller.php b/lib/controller/importcontroller.php index 5d093298..23877099 100644 --- a/lib/controller/importcontroller.php +++ b/lib/controller/importcontroller.php @@ -178,7 +178,7 @@ class ImportController extends BaseController { $writeProgress('40'); $imported = 0; $failed = 0; - $partial = 0; + $partially = 0; foreach($parts as $part) { try { @@ -186,7 +186,7 @@ class ImportController extends BaseController { } catch (VObject\ParseException $e) { try { $vcard = VObject\Reader::read($part, VObject\Reader::OPTION_IGNORE_INVALID_LINES); - $partial += 1; + $partially += 1; $response->debug('Import: Retrying reading card. Error parsing VCard: ' . $e->getMessage()); } catch (\Exception $e) { $failed += 1; @@ -213,6 +213,7 @@ class ImportController extends BaseController { 'backend' => $params['backend'], 'addressbookid' => $params['addressbookid'], 'imported' => $imported, + 'partially' => $partially, 'failed' => $failed, ) );