You've already forked postfixadmin
mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2025-07-29 22:41:11 +03:00
Add checks to login.php and cli to ensure database layout is up to date
- add check_db_version() to functions.inc.php - add $min_db_version (needs to be updated at least before the release) - call check_db_version in login.php, users/login.php and CLI - they'll error out if the database layout is outdated - change setup.php to use check_db_version() git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1853 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
@ -177,6 +177,9 @@ class PostfixAdmin {
|
||||
return false;
|
||||
}
|
||||
|
||||
# make sure global variables fron functions.inc.php end up in the global namespace, instead of being local to this function
|
||||
global $version, $min_db_version;
|
||||
|
||||
if (!require_once(PATH . '/common.php')) {
|
||||
$this->stderr("Failed to load " . PATH . '/common.php');
|
||||
return false;
|
||||
@ -190,6 +193,8 @@ class PostfixAdmin {
|
||||
public function dispatch() {
|
||||
$CONF = Config::read('all');
|
||||
|
||||
check_db_version(); # ensure the database layout is up to date
|
||||
|
||||
if (!isset($this->args[0])) {
|
||||
$this->help();
|
||||
return;
|
||||
|
Reference in New Issue
Block a user