Skip to content

Commit

Permalink
Standardize database connection settings
Browse files Browse the repository at this point in the history
  • Loading branch information
zozlak committed Sep 20, 2024
1 parent 19a7cf4 commit 188f59b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config-sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ configInfo:
maximumRecords: 100
setting: {}
supports: {}
dbConnStr: host=127.0.0.1 port=5432 user=fcs dbname=www-data password=***
dbConnStr: "pgsql: host=127.0.0.1 port=5432 user=fcs dbname=www-data password=***"
cmdiUrl: https://arche.acdh.oeaw.ac.at/oaipmh/?verb=GetRecordRaw&metadataPrefix=cmdi&identifier=%s
highlighting:
minWords: 5
Expand Down
2 changes: 1 addition & 1 deletion src/acdhOeaw/arche/fcs/Endpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ private function sanitizeParam(SruParameters $param, string $operation): void {
}

private function getDbHandle(): PDO {
$pdo = new PDO('pgsql: ' . $this->cfg->dbConnStr);
$pdo = new PDO($this->cfg->dbConnStr);
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$pdo->beginTransaction();
return $pdo;
Expand Down

0 comments on commit 188f59b

Please sign in to comment.