diff options
| author | Mandragorat Wandystanu <wktir@wandystan.eu> | 2017-11-15 15:09:30 +0100 |
|---|---|---|
| committer | Mandragorat Wandystanu <wktir@wandystan.eu> | 2017-11-16 14:31:39 +0100 |
| commit | 9d6341d270c01d09194a1bf169390ad8198f694d (patch) | |
| tree | b139a296e9d7a0b15563936f6ed6fe16a992d8b9 /static | |
| parent | 2ef75d9c2e0e5ea6effbe28c49ed8184ad613f53 (diff) | |
database.inc.php: Source settings from settings_local.inc.php if it exists (modelled after GNU MediaGoblin).
Diffstat (limited to 'static')
| -rw-r--r-- | static/php/includes/database.inc.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/static/php/includes/database.inc.php b/static/php/includes/database.inc.php index 7a1d4f9..3a4feeb 100644 --- a/static/php/includes/database.inc.php +++ b/static/php/includes/database.inc.php @@ -24,7 +24,11 @@ * SOFTWARE. */ -require_once 'settings.inc.php'; +if (file_exists(stream_resolve_include_path('settings_local.inc.php'))) { + require_once 'settings_local.inc.php'; +} else { + require_once 'settings.inc.php'; +} /* NOTE: we don't have to unref the PDO because we're not long-running */ $db = new PDO(POMF_DB_CONN, POMF_DB_USER, POMF_DB_PASS); |
