Skip to content
Snippets Groups Projects
Commit 86fddbd2 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Fixed a minor bug

parent 92e380b0
No related branches found
No related tags found
No related merge requests found
...@@ -8,16 +8,16 @@ class Config { ...@@ -8,16 +8,16 @@ class Config {
public $username; public $username;
public $password; public $password;
public $page_prefix; public $path_prefix;
public function __construct(string $page_prefix, string $database_connector, string $username, string $password) { public function __construct(string $path_prefix, string $database_connector, string $username, string $password) {
$this->database_connector = $database_connector; $this->database_connector = $database_connector;
$this->username = $username; $this->username = $username;
$this->password = $password; $this->password = $password;
$this->page_prefix = $page_prefix; $this->path_prefix = $path_prefix;
} }
public static function createFromGlobals() { public static function createFromGlobals() {
return new Config(page_prefix, 'pgsql:host=' . db_host . ';port=' . db_port . ';dbname=' . db_name . '', db_user, db_pass); return new Config(path_prefix, 'pgsql:host=' . db_host . ';port=' . db_port . ';dbname=' . db_name . '', db_user, db_pass);
} }
} }
\ No newline at end of file
...@@ -37,6 +37,6 @@ class RendererHelper { ...@@ -37,6 +37,6 @@ class RendererHelper {
} }
public function redirect(string $page, string $flash = null) { public function redirect(string $page, string $flash = null) {
header('Location: ' . $this->config->page_prefix . $page); header('Location: ' . $this->config->path_prefix . $page);
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment