Move the addon-specific config in config/addon.ini.php
- Add sample addon.ini.php file - Add config/addon.ini.php file to git ignore
This commit is contained in:
parent
e72ff9ee95
commit
3001951075
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -12,6 +12,7 @@ robots.txt
|
||||||
|
|
||||||
#ignore local config
|
#ignore local config
|
||||||
/config/local.ini.php
|
/config/local.ini.php
|
||||||
|
/config/addon.ini.php
|
||||||
|
|
||||||
#ignore documentation, it should be newly built
|
#ignore documentation, it should be newly built
|
||||||
/doc/html
|
/doc/html
|
||||||
|
|
10
config/addon-sample.ini.php
Normal file
10
config/addon-sample.ini.php
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<?php return <<<INI
|
||||||
|
|
||||||
|
; Copy this configuration file to addon.ini.php and edit it if you want to configure addons, see below example for the twitter addon
|
||||||
|
|
||||||
|
;[twitter]
|
||||||
|
;consumerkey = localhost
|
||||||
|
;consumersecret = mysqlusername
|
||||||
|
|
||||||
|
INI;
|
||||||
|
// Keep this line
|
|
@ -403,9 +403,9 @@ class App
|
||||||
// Loads addons default config
|
// Loads addons default config
|
||||||
Core\Addon::callHooks('load_config');
|
Core\Addon::callHooks('load_config');
|
||||||
|
|
||||||
// Load the local config file again in case there are overwritten addon config
|
// Load the local addon config file to overwritten default addon config values
|
||||||
if (file_exists($this->basepath . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'local.ini.php')) {
|
if (file_exists($this->basepath . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'addon.ini.php')) {
|
||||||
$this->loadConfigFile($this->basepath . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'local.ini.php');
|
$this->loadConfigFile($this->basepath . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'addon.ini.php');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue