Skip to content

Commit 116557c

Browse files
authored
Merge pull request #435 from cultuurnet/feature/use_config_everywhere
Use mongoDB database name from config file
2 parents dcd7785 + 5d85308 commit 116557c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/ApplicationBase.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,12 +256,12 @@ function ($translator, $app) {
256256
);
257257

258258
// Mongodb.
259-
$mongdbConfig = $this['config']['mongodb'];
259+
$mongodbConfig = $this['config']['mongodb'];
260260
$client = new Client(
261-
'mongodb://' . $mongdbConfig['default']['host'] . ':' . $mongdbConfig['default']['port'],
261+
'mongodb://' . $mongodbConfig['default']['host'] . ':' . $mongodbConfig['default']['port'],
262262
[
263263
[
264-
'db' => $mongdbConfig['default']['dbname'],
264+
'db' => $mongodbConfig['default']['dbname'],
265265
],
266266
]
267267
);
@@ -283,7 +283,7 @@ function ($translator, $app) {
283283
'mongodbodm.hydrator_dir' => $this['config']['odm_orm']['hydrator_dir'],
284284
'mongodbodm.auto_generate_hydrators' => Configuration::AUTOGENERATE_FILE_NOT_EXISTS,
285285
"mongodbodm.dm.options" => [
286-
"database" => "widgets",
286+
"database" => $mongodbConfig['default']['dbname'],
287287
"mappings" => [
288288
[
289289
"type" => "annotation",

0 commit comments

Comments
 (0)