mirror of
https://github.com/Mibew/mibew.git
synced 2025-02-12 18:41:08 +03:00
Do not use global variable $dbversion
Replace $dbversion global variable with DB_VERSION constant
This commit is contained in:
parent
83b029e3b9
commit
e42c3feaa7
@ -327,7 +327,7 @@ function add_canned_messages($link){
|
|||||||
|
|
||||||
function check_status()
|
function check_status()
|
||||||
{
|
{
|
||||||
global $page, $dbversion, $mysqlprefix;
|
global $page, $mysqlprefix;
|
||||||
|
|
||||||
$page['done'][] = getlocal2("install.0.php", array(phpversion()));
|
$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("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);
|
mysql_close($link);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ $version = '2.0';
|
|||||||
/**
|
/**
|
||||||
* Current version of database structure
|
* Current version of database structure
|
||||||
*/
|
*/
|
||||||
$dbversion = '2.0';
|
define('DB_VERSION', '2.0');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Current version of implemented features
|
* Current version of implemented features
|
||||||
|
@ -31,7 +31,7 @@ $isonline = is_operator_online($operator['operatorid']);
|
|||||||
$page = array(
|
$page = array(
|
||||||
'version' => $version,
|
'version' => $version,
|
||||||
'localeLinks' => get_locale_links(MIBEW_WEB_ROOT . "/operator/index.php"),
|
'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']),
|
'needChangePassword' => check_password_hash($operator['vclogin'], '', $operator['vcpassword']),
|
||||||
'profilePage' => MIBEW_WEB_ROOT . "/operator/operator.php?op=".$operator['operatorid'],
|
'profilePage' => MIBEW_WEB_ROOT . "/operator/operator.php?op=".$operator['operatorid'],
|
||||||
'updateWizard' => MIBEW_WEB_ROOT . "/install/",
|
'updateWizard' => MIBEW_WEB_ROOT . "/install/",
|
||||||
|
Loading…
Reference in New Issue
Block a user