use webimroot in redirection, spaces and tabs in views

git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@116 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
Evgeny Gryaznov 2008-09-29 22:59:58 +00:00
parent bc275661fe
commit ef39c0a1fe
3 changed files with 12 additions and 13 deletions

View File

@ -20,14 +20,13 @@ $page = array(
'localeLinks' => get_locale_links("$webimroot/install/index.php")
);
$page['done'] = array();
$page['nextstep'] = false;
$page['nextnotice'] = false;
$errors = array();
function check_connection() {
global $mysqlhost,$mysqllogin,$mysqlpass, $page, $errors;
global $mysqlhost,$mysqllogin,$mysqlpass, $page, $errors, $webimroot;
$link = @mysql_connect($mysqlhost,$mysqllogin,$mysqlpass);
if ($link) {
$result = mysql_query("SELECT VERSION() as c", $link);
@ -47,7 +46,7 @@ function check_connection() {
}
function check_database($link) {
global $mysqldb, $force_charset_in_connection, $dbencoding, $page;
global $mysqldb, $force_charset_in_connection, $dbencoding, $page, $webimroot;
if(mysql_select_db($mysqldb,$link)) {
$page['done'][] = getlocal2("install.2.db_exists", array($mysqldb));
if( $force_charset_in_connection ) {
@ -57,13 +56,13 @@ function check_database($link) {
} else {
$page['nextstep'] = getlocal2("install.2.create", array($mysqldb));
$page['nextnotice'] = getlocal("install.2.notice");
$page['nextstepurl'] = "dbperform.php?act=createdb";
$page['nextstepurl'] = "$webimroot/install/dbperform.php?act=createdb";
}
return false;
}
function check_tables($link) {
global $dbtables, $page;
global $dbtables, $page, $webimroot;
$curr_tables = get_tables($link);
if( $curr_tables !== false) {
$tocreate = array_diff(array_keys($dbtables), $curr_tables);
@ -72,14 +71,14 @@ function check_tables($link) {
return true;
} else {
$page['nextstep'] = getlocal("install.3.create");
$page['nextstepurl'] = "dbperform.php?act=createtables";
$page['nextstepurl'] = "$webimroot/install/dbperform.php?act=createtables";
}
}
return false;
}
function check_columns($link) {
global $dbtables, $dbtables_can_update, $errors, $page;
global $dbtables, $dbtables_can_update, $errors, $page, $webimroot;
$need_to_create_columns = false;
foreach( $dbtables as $id => $columns) {
@ -93,7 +92,7 @@ function check_columns($link) {
if( count($cannot_update) != 0) {
$errors[] = "Key columns are absent in table `$id'. Unable to continue installation.";
$page['nextstep'] = getlocal("install.kill_tables");
$page['nextstepurl'] = "dbperform.php?act=droptables";
$page['nextstepurl'] = "$webimroot/install/dbperform.php?act=droptables";
$page['nextnotice'] = getlocal("install.kill_tables.notice");
return false;
}
@ -103,7 +102,7 @@ function check_columns($link) {
if( $need_to_create_columns ) {
$page['nextstep'] = getlocal("install.4.create");
$page['nextstepurl'] = "dbperform.php?act=addcolumns";
$page['nextstepurl'] = "$webimroot/install/dbperform.php?act=addcolumns";
$page['nextnotice'] = getlocal("install.4.notice");
return false;
}

View File

@ -34,9 +34,9 @@
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td valign="top" class="text">
<h1><?php echo getlocal("install.title") ?></h1>
<?php echo getlocal("install.message") ?>
<br />

View File

@ -34,9 +34,9 @@
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td valign="top" class="text">
<h1><?php echo getlocal("install.err.title") ?></h1>
<?php if( isset($errors) && count($errors) > 0 ) { ?>
<table cellspacing="0" cellpadding="0" border="0">