mirror of
https://github.com/Mibew/java.git
synced 2025-01-22 17:40:35 +03:00
#2471875 Suggest to update if DB is outdated
git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@341 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
parent
d47ae40c0a
commit
2a9a79393d
@ -13,6 +13,7 @@
|
||||
*/
|
||||
|
||||
require_once('../libs/common.php');
|
||||
require_once('../libs/settings.php');
|
||||
require_once('dbinfo.php');
|
||||
|
||||
$page = array(
|
||||
@ -112,7 +113,7 @@ function check_columns($link) {
|
||||
}
|
||||
|
||||
function check_status() {
|
||||
global $page, $webimroot;
|
||||
global $page, $webimroot, $settings, $dbversion;
|
||||
$link = check_connection();
|
||||
if(!$link) {
|
||||
return;
|
||||
@ -140,6 +141,10 @@ function check_status() {
|
||||
$page['nextstepurl'] = "$webimroot/";
|
||||
|
||||
mysql_close($link);
|
||||
|
||||
loadsettings();
|
||||
$settings['dbversion'] = $dbversion;
|
||||
update_settings();
|
||||
}
|
||||
|
||||
check_status();
|
||||
|
@ -460,7 +460,10 @@ function webim_mail($toaddr, $reply_to, $subject, $body) {
|
||||
mail($toaddr, $real_subject, wordwrap(myiconv($webim_encoding, $mail_encoding, $body),70), $headers);
|
||||
}
|
||||
|
||||
$dbversion = '1.5.1';
|
||||
|
||||
$settings = array(
|
||||
'dbversion' => 0,
|
||||
'email' => '', /* inbox for left messages */
|
||||
'title' => 'Your Company',
|
||||
'hosturl' => 'http://webim.sourceforge.net',
|
||||
|
@ -140,6 +140,7 @@ install.license=Software license agreement
|
||||
install.message=Follow the wizard to setup your database.
|
||||
install.next=Next step:
|
||||
install.title=Installation
|
||||
install.updatedb=Please, run <a href="{0}">Update wizard</a> to adjust your database.
|
||||
installed.login_link=Proceed to login page
|
||||
installed.message=<b>Application installed successfully.</b>
|
||||
installed.notice=You can logon as admin with empty password.<br/><br/><font color="#c13030"><b>!!! For security reasons, please change your password immediately and remove /webim/install folder from your server.</b></font>
|
||||
|
@ -52,6 +52,7 @@ image.button.delete
|
||||
image.button.login
|
||||
image.button.save
|
||||
image.button.search
|
||||
install.updatedb
|
||||
leftMenu.client_agents
|
||||
leftMenu.client_gen_button
|
||||
leftMenu.client_settings
|
||||
|
@ -24,6 +24,8 @@ $page = array(
|
||||
'localeLinks' => get_locale_links("$webimroot/operator/index.php"),
|
||||
'showban' => $settings['enableban'] == "1",
|
||||
'showadmin' => is_capable($can_administrate, $operator),
|
||||
'needUpdate' => $settings['dbversion'] != $dbversion,
|
||||
'updateWizard' => "$webimroot/install/",
|
||||
);
|
||||
|
||||
start_html_output();
|
||||
|
@ -43,6 +43,10 @@
|
||||
<?php echo getlocal("admin.content.description") ?>
|
||||
<br>
|
||||
<br>
|
||||
<?php if( $page['needUpdate'] ) { ?>
|
||||
<div id="formmessage"><?php echo getlocal2("install.updatedb",array($page['updateWizard'])) ?></div>
|
||||
<br/>
|
||||
<?php } ?>
|
||||
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user