Don't read .dist config file
This commit is contained in:
parent
6de3f3666e
commit
7c72f38ef5
1 changed files with 15 additions and 12 deletions
|
@ -33,6 +33,13 @@ class calendar extends rcube_plugin
|
|||
public $ical;
|
||||
public $ui;
|
||||
|
||||
private $default_categories = array(
|
||||
'Personal' => 'c0c0c0',
|
||||
'Work' => 'ff0000',
|
||||
'Family' => '00ff00',
|
||||
'Holiday' => 'ff6600',
|
||||
);
|
||||
|
||||
/**
|
||||
* Plugin initialization.
|
||||
*/
|
||||
|
@ -43,11 +50,7 @@ class calendar extends rcube_plugin
|
|||
$this->register_task('calendar', 'calendar');
|
||||
|
||||
// load calendar configuration
|
||||
if(file_exists($this->home . "/config.inc.php")) {
|
||||
$this->load_config('config.inc.php');
|
||||
} else {
|
||||
$this->load_config('config.inc.php.dist');
|
||||
}
|
||||
$this->load_config();
|
||||
|
||||
// load localizations
|
||||
$this->add_texts('localization/', !$this->rc->action || $this->rc->task != 'calendar');
|
||||
|
@ -254,7 +257,7 @@ class calendar extends rcube_plugin
|
|||
if (!$this->driver->categoriesimmutable) {
|
||||
$p['blocks']['categories']['name'] = $this->gettext('categories');
|
||||
|
||||
$categories = $this->rc->config->get('calendar_categories', array());
|
||||
$categories = (array) $this->rc->config->get('calendar_categories', $this->default_categories);
|
||||
$categories_list = '';
|
||||
foreach ($categories as $name => $color) {
|
||||
$key = md5($name);
|
||||
|
|
Loading…
Add table
Reference in a new issue