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

Return status on partially imported vcards

This commit is contained in:
Thomas Tanghus 2013-05-18 00:08:23 +02:00
parent 653ff015e8
commit f67d18b894

View File

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