mirror of
https://github.com/Mibew/tray.git
synced 2025-01-22 18:10:34 +03:00
404 problem fix
git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@516 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
parent
9c6b9ff678
commit
3ab00d8111
@ -22,7 +22,8 @@ function runsql($query,$link) {
|
|||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
|
|
||||||
$act = verifyparam( "act", "/^(silentcreateall|createdb|createtables|droptables|addcolumns)$/");
|
$act = verifyparam( "act", "/^(silentcreateall|createdb|ct|dt|addcolumns)$/");
|
||||||
|
|
||||||
$link = @mysql_connect($mysqlhost,$mysqllogin ,$mysqlpass )
|
$link = @mysql_connect($mysqlhost,$mysqllogin ,$mysqlpass )
|
||||||
or show_install_err('Could not connect: ' . mysql_error());
|
or show_install_err('Could not connect: ' . mysql_error());
|
||||||
|
|
||||||
@ -42,7 +43,7 @@ if ($act == "silentcreateall") {
|
|||||||
mysql_query("SET character set $dbencoding", $link);
|
mysql_query("SET character set $dbencoding", $link);
|
||||||
}
|
}
|
||||||
|
|
||||||
if( $act == "createtables") {
|
if( $act == "ct") {
|
||||||
$curr_tables = get_tables($link);
|
$curr_tables = get_tables($link);
|
||||||
if( $curr_tables === false) {
|
if( $curr_tables === false) {
|
||||||
show_install_err($errors[0]);
|
show_install_err($errors[0]);
|
||||||
@ -51,7 +52,7 @@ if ($act == "silentcreateall") {
|
|||||||
foreach( $tocreate as $id) {
|
foreach( $tocreate as $id) {
|
||||||
create_table($id, $link);
|
create_table($id, $link);
|
||||||
}
|
}
|
||||||
} else if( $act == "droptables") {
|
} else if( $act == "dt") {
|
||||||
foreach( array_keys($dbtables) as $id) {
|
foreach( array_keys($dbtables) as $id) {
|
||||||
mysql_query("DROP TABLE IF EXISTS $id",$link)
|
mysql_query("DROP TABLE IF EXISTS $id",$link)
|
||||||
or show_install_err(' Query failed: '.mysql_error());
|
or show_install_err(' Query failed: '.mysql_error());
|
||||||
|
@ -72,7 +72,7 @@ function check_tables($link) {
|
|||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
$page['nextstep'] = getlocal("install.3.create");
|
$page['nextstep'] = getlocal("install.3.create");
|
||||||
$page['nextstepurl'] = "$webimroot/install/dbperform.php?act=createtables";
|
$page['nextstepurl'] = "$webimroot/install/dbperform.php?act=ct";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -93,7 +93,7 @@ function check_columns($link) {
|
|||||||
if( count($cannot_update) != 0) {
|
if( count($cannot_update) != 0) {
|
||||||
$errors[] = "Key columns are absent in table `$id'. Unable to continue installation.";
|
$errors[] = "Key columns are absent in table `$id'. Unable to continue installation.";
|
||||||
$page['nextstep'] = getlocal("install.kill_tables");
|
$page['nextstep'] = getlocal("install.kill_tables");
|
||||||
$page['nextstepurl'] = "$webimroot/install/dbperform.php?act=droptables";
|
$page['nextstepurl'] = "$webimroot/install/dbperform.php?act=dt";
|
||||||
$page['nextnotice'] = getlocal("install.kill_tables.notice");
|
$page['nextnotice'] = getlocal("install.kill_tables.notice");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user