1
0
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:
jbtbnl 2015-01-31 11:59:26 +01:00
commit f086a7a6f4
2 changed files with 2 additions and 2 deletions

View File

@ -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 {

View File

@ -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 {