diff --git a/core/Api/RoutesAPI.class.php b/core/Api/RoutesAPI.class.php index 793ba2a..5cb0cda 100644 --- a/core/Api/RoutesAPI.class.php +++ b/core/Api/RoutesAPI.class.php @@ -156,6 +156,7 @@ namespace Api\Routes { // INSERT new routes if ($this->success) { $stmt = $sql->insert("Route", array("request", "action", "target", "extra", "active")); + foreach($this->routes as $route) { $stmt->addRow($route["request"], $route["action"], $route["target"], $route["extra"], $route["active"]); } diff --git a/core/Documents/Install.class.php b/core/Documents/Install.class.php index b7daf7c..a7d419f 100644 --- a/core/Documents/Install.class.php +++ b/core/Documents/Install.class.php @@ -142,7 +142,7 @@ namespace Documents\Install { $this->errorString = $req->getLastError(); } else { $req = new \Api\Notifications\Create($user); - $success = $req->execute(array( + $req->execute(array( "title" => "Welcome", "message" => "Your Web-base was successfully installed. Check out the admin dashboard. Have fun!", "groupId" => USER_GROUP_ADMIN @@ -732,7 +732,6 @@ namespace Documents\Install { return $html; } - function getCode() { $html = parent::getCode(); @@ -779,6 +778,7 @@ namespace Documents\Install { $progressSidebar = $this->createProgressSidebar(); $progressMainview = $this->createProgessMainview(); + $errorStyle = ($this->errorString ? '' : ' style="display:none"'); $errorClass = ($this->errorString ? ' alert-danger' : ''); diff --git a/core/Driver/SQL/PostgreSQL.class.php b/core/Driver/SQL/PostgreSQL.class.php index f8fe8bc..6836842 100644 --- a/core/Driver/SQL/PostgreSQL.class.php +++ b/core/Driver/SQL/PostgreSQL.class.php @@ -74,7 +74,7 @@ class PostgreSQL extends SQL { public function getLastError() { $lastError = parent::getLastError(); if (empty($lastError)) { - $lastError = pg_last_error($this->connection) . " " . pg_last_error($this->connection); + $lastError = trim(pg_last_error($this->connection) . " " . pg_last_error($this->connection)); } return $lastError; diff --git a/core/Driver/SQL/SQL.class.php b/core/Driver/SQL/SQL.class.php index 3c5b094..c22c187 100644 --- a/core/Driver/SQL/SQL.class.php +++ b/core/Driver/SQL/SQL.class.php @@ -395,6 +395,6 @@ abstract class SQL { public abstract function getStatus(); public function parseBool($val) : bool { - return in_array($val, array(true, 1, '1', 't', 'true', 'TRUE')); + return in_array($val, array(true, 1, '1', 't', 'true', 'TRUE'), true); } } \ No newline at end of file