mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-01-18 07:52:21 +01:00
Merge pull request #795 from owncloud/improve-connectors
improve import automatic selection
This commit is contained in:
commit
f086a7a6f4
@ -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…
x
Reference in New Issue
Block a user