Do not use global variable $dbversion

Replace $dbversion global variable with DB_VERSION constant
This commit is contained in:
Dmitriy Simushev 2014-01-20 14:43:50 +00:00
parent 83b029e3b9
commit e42c3feaa7
3 changed files with 4 additions and 4 deletions

View File

@ -327,7 +327,7 @@ function add_canned_messages($link){
function check_status()
{
global $page, $dbversion, $mysqlprefix;
global $page, $mysqlprefix;
$page['done'][] = getlocal2("install.0.php", array(phpversion()));
@ -379,7 +379,7 @@ function check_status()
mysql_query("insert into ${mysqlprefix}chatconfig (vckey) values ('dbversion')", $link);
}
mysql_query("update ${mysqlprefix}chatconfig set vcvalue = '{$dbversion}' where vckey='dbversion'", $link);
mysql_query("update ${mysqlprefix}chatconfig set vcvalue = '" . DB_VERSION . "' where vckey='dbversion'", $link);
mysql_close($link);
}

View File

@ -23,7 +23,7 @@ $version = '2.0';
/**
* Current version of database structure
*/
$dbversion = '2.0';
define('DB_VERSION', '2.0');
/**
* Current version of implemented features

View File

@ -31,7 +31,7 @@ $isonline = is_operator_online($operator['operatorid']);
$page = array(
'version' => $version,
'localeLinks' => get_locale_links(MIBEW_WEB_ROOT . "/operator/index.php"),
'needUpdate' => Settings::get('dbversion') != $dbversion,
'needUpdate' => Settings::get('dbversion') != DB_VERSION,
'needChangePassword' => check_password_hash($operator['vclogin'], '', $operator['vcpassword']),
'profilePage' => MIBEW_WEB_ROOT . "/operator/operator.php?op=".$operator['operatorid'],
'updateWizard' => MIBEW_WEB_ROOT . "/install/",