mirror of
https://github.com/Mibew/mibew.git
synced 2025-01-31 21:34:42 +03:00
Do not use $version global variable
Replace $version global var with MIBEW_VERSION constant
This commit is contained in:
parent
c1ae7b8eb9
commit
6da2a33ce3
@ -288,9 +288,9 @@ $dbtables_can_update = array(
|
||||
|
||||
function show_install_err($text)
|
||||
{
|
||||
global $page, $version, $errors;
|
||||
global $page, $errors;
|
||||
$page = array(
|
||||
'version' => $version,
|
||||
'version' => MIBEW_VERSION,
|
||||
'localeLinks' => get_locale_links(MIBEW_WEB_ROOT . "/install/index.php"),
|
||||
'title' => getlocal("install.err.title"),
|
||||
'no_right_menu' => true,
|
||||
|
@ -59,7 +59,7 @@ require_once(MIBEW_FS_ROOT.'/libs/classes/Mibew/Style/PageStyle.php');
|
||||
require_once(MIBEW_FS_ROOT.'/install/dbinfo.php');
|
||||
|
||||
$page = array(
|
||||
'version' => $version,
|
||||
'version' => MIBEW_VERSION,
|
||||
'localeLinks' => get_locale_links(MIBEW_WEB_ROOT . "/install/index.php")
|
||||
);
|
||||
|
||||
|
@ -45,7 +45,7 @@ class PageStyle extends Style implements StyleInterface {
|
||||
public function render($template_name, $data = array()) {
|
||||
// We need to import some variables to make them visible to required
|
||||
// view.
|
||||
global $page, $version, $errors;
|
||||
global $page, $errors;
|
||||
|
||||
// Add template root value to page variables
|
||||
$page['stylepath'] = MIBEW_WEB_ROOT . '/' . $this->filesPath();
|
||||
|
@ -18,7 +18,7 @@
|
||||
/**
|
||||
* Current version of Mibew Messenger
|
||||
*/
|
||||
$version = '2.0';
|
||||
define('MIBEW_VERSION', '2.0');
|
||||
|
||||
/**
|
||||
* Current version of database structure
|
||||
|
@ -29,7 +29,7 @@ force_password($operator);
|
||||
$isonline = is_operator_online($operator['operatorid']);
|
||||
|
||||
$page = array(
|
||||
'version' => $version,
|
||||
'version' => MIBEW_VERSION,
|
||||
'localeLinks' => get_locale_links(MIBEW_WEB_ROOT . "/operator/index.php"),
|
||||
'needUpdate' => Settings::get('dbversion') != DB_VERSION,
|
||||
'needChangePassword' => check_password_hash($operator['vclogin'], '', $operator['vcpassword']),
|
||||
|
@ -23,7 +23,7 @@ require_once(dirname(dirname(__FILE__)).'/libs/init.php');
|
||||
require_once(MIBEW_FS_ROOT.'/libs/operator.php');
|
||||
|
||||
$errors = array();
|
||||
$page = array('formisRemember' => true, 'version' => $version);
|
||||
$page = array('formisRemember' => true, 'version' => MIBEW_VERSION);
|
||||
|
||||
if (isset($_POST['login']) && isset($_POST['password'])) {
|
||||
$login = getparam('login');
|
||||
|
@ -26,7 +26,7 @@ require_once(MIBEW_FS_ROOT.'/libs/settings.php');
|
||||
|
||||
$errors = array();
|
||||
$page = array(
|
||||
'version' => $version,
|
||||
'version' => MIBEW_VERSION,
|
||||
'showform' => true,
|
||||
'title' => getlocal("resetpwd.title"),
|
||||
'headertitle' => getlocal("app.title"),
|
||||
|
@ -27,7 +27,7 @@ require_once(MIBEW_FS_ROOT.'/libs/notify.php');
|
||||
|
||||
$errors = array();
|
||||
$page = array(
|
||||
'version' => $version,
|
||||
'version' => MIBEW_VERSION,
|
||||
'title' => getlocal("restore.title"),
|
||||
'headertitle' => getlocal("app.title"),
|
||||
'show_small_login' => true,
|
||||
|
@ -32,7 +32,7 @@ $errors = array();
|
||||
$page = array(
|
||||
'localizations' => get_available_locales(),
|
||||
'phpVersion' => phpversion(),
|
||||
'version' => $version,
|
||||
'version' => MIBEW_VERSION,
|
||||
'title' => getlocal("updates.title"),
|
||||
'menuid' => "updates",
|
||||
);
|
||||
|
@ -84,7 +84,7 @@ $isrtl = getlocal("localedirection") == 'rtl';
|
||||
<div class="empty_inner" style=""> </div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<p id="legal"><a href="http://mibew.org/" target="_blank" class="flink">Mibew Messenger</a> <?php echo $version ?> | (c) 2011-2013 mibew.org</p>
|
||||
<p id="legal"><a href="http://mibew.org/" target="_blank" class="flink">Mibew Messenger</a> <?php echo MIBEW_VERSION ?> | (c) 2011-2013 mibew.org</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -32,7 +32,7 @@ function menuseparator() {
|
||||
if(($menuItemsCount%3) == 0) { echo "</tr><tr>"; }
|
||||
}
|
||||
|
||||
function tpl_content() { global $page, $current_locale, $menuItemsCount, $version;
|
||||
function tpl_content() { global $page, $current_locale, $menuItemsCount;
|
||||
?>
|
||||
|
||||
<br/>
|
||||
@ -44,7 +44,7 @@ function tpl_content() { global $page, $current_locale, $menuItemsCount, $versio
|
||||
<div id="formmessage"><?php echo getlocal2("install.updatedb",array($page['updateWizard'])) ?></div>
|
||||
<br/>
|
||||
<?php } else if($page['newFeatures']) { ?>
|
||||
<div><div id="formmessage"><?php echo getlocal2("install.newfeatures",array($page['featuresPage'], $version)) ?></div></div>
|
||||
<div><div id="formmessage"><?php echo getlocal2("install.newfeatures",array($page['featuresPage'], MIBEW_VERSION)) ?></div></div>
|
||||
<br/>
|
||||
<?php } ?>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user