From e551d5037811aff231479067138946816f8c816d Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Wed, 20 Dec 2023 22:11:30 +0100 Subject: [PATCH] Support simple vCard configuration --- data/bdrem.config.php.dist | 7 +------ src/bdrem/Source/vCard.php | 7 ++++++- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/data/bdrem.config.php.dist b/data/bdrem.config.php.dist index 46773ed..55dbe81 100644 --- a/data/bdrem.config.php.dist +++ b/data/bdrem.config.php.dist @@ -54,12 +54,7 @@ $source = [ ]; //Source: Directory of .vcf vCard files (2 subfolder levels supported) -$source = [ - 'vCard', - [ - 'folder' => '/home/cweiske/dev/contacts-backup/contacts' - ] -]; +$source = ['vCard', '/home/user/contacts/']; $daysPrev = 3; diff --git a/src/bdrem/Source/vCard.php b/src/bdrem/Source/vCard.php index 98b8e00..3d55915 100644 --- a/src/bdrem/Source/vCard.php +++ b/src/bdrem/Source/vCard.php @@ -37,8 +37,13 @@ class Source_vCard /** * Set the VCard folder path */ - public function __construct(array $config) + public function __construct($config) { + if (is_string($config)) { + $config = array( + 'folder' => $config + ); + } $this->folder = $config['folder']; if (!is_dir($this->folder)) { throw new \Exception( -- 2.30.2