1
0
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:
babelouest 2015-01-29 09:42:22 -05:00
parent 803ca9f6f5
commit ea0f5119db
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 {