Skip to content

Commit 632e6eb

Browse files
committed
Redirect to upgrade if there is one
1 parent 5db684c commit 632e6eb

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

vendor/traq/controllers/app_controller.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,13 @@ public function __construct()
6363
// Set DB connection
6464
$this->db = Database::connection();
6565

66+
$dbVersion = settings('db_version');
67+
if ($dbVersion < TRAQ_DB_VER) {
68+
// Database version is out of date, redirect to upgrader
69+
header("Location: " . Request::base('install/upgrade.php'));
70+
exit;
71+
}
72+
6673
// Set the theme
6774
View::$theme = settings('theme');
6875
View::$inherit_from = APPPATH . "/views/default";

0 commit comments

Comments
 (0)