From cbf951471e3a3bb3f7ddd0f9ca2d07241aba756d Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Thu, 13 Feb 2014 18:00:39 +0100 Subject: [PATCH] update configuration example file, fix variable names --- data/bdrem.config.php.dist | 15 ++++++++++----- src/bdrem/Config.php | 4 ++-- src/bdrem/UserInterface.php | 4 ++-- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/data/bdrem.config.php.dist b/data/bdrem.config.php.dist index 7af4ed0..076533f 100644 --- a/data/bdrem.config.php.dist +++ b/data/bdrem.config.php.dist @@ -15,14 +15,19 @@ $source = array( //column name => event title 'c_birthday' => 'Birthday' ), - //column with name - 'name' => 'c_name' + //column with name, or array with column names + 'name' => array('c_name'), + //sprintf-compatible name formatting instruction + 'nameFormat' => '%s', ) ) ); - -$daysBefore = 3; -$daysAfter = 14; +$daysPrev = 3; +$daysNext = 14; $locale = 'de_DE.UTF-8'; + +//email settings +$mail_from = 'birthday@example.org'; +$mail_to = array('a@example.org', 'b@example.org'); ?> diff --git a/src/bdrem/Config.php b/src/bdrem/Config.php index 7a0fd68..04cf888 100644 --- a/src/bdrem/Config.php +++ b/src/bdrem/Config.php @@ -5,8 +5,8 @@ class Config { public $source; public $date; - public $daysBefore; - public $daysAfter; + public $daysPrev; + public $daysNext; public $locale; public function load() diff --git a/src/bdrem/UserInterface.php b/src/bdrem/UserInterface.php index e4f7168..5fb028b 100644 --- a/src/bdrem/UserInterface.php +++ b/src/bdrem/UserInterface.php @@ -38,7 +38,7 @@ abstract class UserInterface 'description' => 'Show NUM days after date', 'help_name' => 'NUM', 'action' => 'StoreInt', - 'default' => $this->config->daysAfter, + 'default' => $this->config->daysNext, ) ); $parser->addOption( @@ -49,7 +49,7 @@ abstract class UserInterface 'description' => 'Show NUM days before date', 'help_name' => 'NUM', 'action' => 'StoreInt', - 'default' => $this->config->daysBefore, + 'default' => $this->config->daysPrev, ) ); $parser->addOption( -- 2.30.2