Compare commits
2 Commits
dev/lukas
...
573ed034dd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
573ed034dd | ||
|
|
3fb3ecbe52 |
@@ -37,7 +37,7 @@ if ($page === 'logout') {
|
||||
// -----------------------------------------------------------------
|
||||
$pdo = get_db();
|
||||
$stmt = $pdo->prepare("SELECT * FROM municipalities WHERE slug = :slug");
|
||||
$stmt->execute([':slug' => 'lohne']);
|
||||
$stmt->execute([':slug' => 'lohne']); # TODO: add slug as env var
|
||||
$municipality = $stmt->fetch();
|
||||
|
||||
// Show Login Page if not authenticated
|
||||
|
||||
@@ -33,7 +33,7 @@ try {
|
||||
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
|
||||
PDO::ATTR_EMULATE_PREPARES => false
|
||||
];
|
||||
$dsn = "pgsql:host=$host;dbname=$db;port=$port";
|
||||
$dsn = "pgsql:host=$host;dbname=$db;port=$port;sslmode=disable";
|
||||
$pdo = new PDO($dsn, $user, $pass, $opt);
|
||||
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ require_once __DIR__ . '/api/db.php';
|
||||
// -----------------------------------------------------------------
|
||||
$pdo = get_db();
|
||||
$stmt = $pdo->prepare("SELECT * FROM municipalities WHERE slug = :slug");
|
||||
$stmt->execute([':slug' => 'lohne']);
|
||||
$stmt->execute([':slug' => 'lohne']); # TODO: add slug as env var
|
||||
$municipality = $stmt->fetch();
|
||||
|
||||
if (!$municipality) {
|
||||
|
||||
Reference in New Issue
Block a user