Commit 0d622d66386957bec375e732f60c080da9bc0b44
1 parent
db96787e
add local config
Showing
1 changed file
with
9 additions
and
5 deletions
Show diff stats
src/lib/config.php
| ... | ... | @@ -28,14 +28,18 @@ namespace |
| 28 | 28 | * @author Roman Telychko |
| 29 | 29 | * @version 1.0.20130227 |
| 30 | 30 | * |
| 31 | - * @return object | |
| 32 | 31 | */ |
| 33 | 32 | public function __construct() |
| 34 | 33 | { |
| 35 | - $this->config = self::merge( | |
| 36 | - require( ROOT_PATH.'config/global.php' ), | |
| 37 | - require( ROOT_PATH.'config/global-local.php' ) | |
| 38 | - ); | |
| 34 | + if (file_exists(ROOT_PATH.'config/global-local.php')) { | |
| 35 | + $this->config = self::merge( | |
| 36 | + require( ROOT_PATH.'config/global.php' ), | |
| 37 | + require( ROOT_PATH.'config/global-local.php' ) | |
| 38 | + ); | |
| 39 | + } else { | |
| 40 | + $this->config = require( ROOT_PATH.'config/global.php' ); | |
| 41 | + } | |
| 42 | + | |
| 39 | 43 | } |
| 40 | 44 | |
| 41 | 45 | /////////////////////////////////////////////////////////////////////// | ... | ... |