mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-11-29 11:24:11 +01:00
improve import automatic selection
This commit is contained in:
parent
803ca9f6f5
commit
ea0f5119db
@ -202,7 +202,7 @@ class ImportLdifConnector extends ImportConnector{
|
||||
// Examining the first element only
|
||||
$parts = $this->getSourceElementsFromFile($file, 1);
|
||||
|
||||
if (!$parts) {
|
||||
if (!$parts || count($parts[0]) == 0) {
|
||||
// Doesn't look like a ldif file
|
||||
return 0;
|
||||
} else {
|
||||
|
@ -194,7 +194,7 @@ class ImportVCardConnector extends ImportConnector{
|
||||
// Examining the first element only
|
||||
$parts = $this->getSourceElementsFromFile($file, 1);
|
||||
|
||||
if (!$parts || ($parts && count($parts) == 0)) {
|
||||
if (!$parts || ($parts && count($parts[0]) == 0)) {
|
||||
// Doesn't look like a vcf file
|
||||
return 0;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user