diff --git a/src/messenger/webim/install/dbperform.php b/src/messenger/webim/install/dbperform.php index 01486431..fc638ba7 100644 --- a/src/messenger/webim/install/dbperform.php +++ b/src/messenger/webim/install/dbperform.php @@ -22,7 +22,8 @@ function runsql($query,$link) { return $res; } -$act = verifyparam( "act", "/^(silentcreateall|createdb|createtables|droptables|addcolumns)$/"); +$act = verifyparam( "act", "/^(silentcreateall|createdb|ct|dt|addcolumns)$/"); + $link = @mysql_connect($mysqlhost,$mysqllogin ,$mysqlpass ) or show_install_err('Could not connect: ' . mysql_error()); @@ -42,7 +43,7 @@ if ($act == "silentcreateall") { mysql_query("SET character set $dbencoding", $link); } - if( $act == "createtables") { + if( $act == "ct") { $curr_tables = get_tables($link); if( $curr_tables === false) { show_install_err($errors[0]); @@ -51,7 +52,7 @@ if ($act == "silentcreateall") { foreach( $tocreate as $id) { create_table($id, $link); } - } else if( $act == "droptables") { + } else if( $act == "dt") { foreach( array_keys($dbtables) as $id) { mysql_query("DROP TABLE IF EXISTS $id",$link) or show_install_err(' Query failed: '.mysql_error()); diff --git a/src/messenger/webim/install/index.php b/src/messenger/webim/install/index.php index a66fe001..825635be 100644 --- a/src/messenger/webim/install/index.php +++ b/src/messenger/webim/install/index.php @@ -72,7 +72,7 @@ function check_tables($link) { return true; } else { $page['nextstep'] = getlocal("install.3.create"); - $page['nextstepurl'] = "$webimroot/install/dbperform.php?act=createtables"; + $page['nextstepurl'] = "$webimroot/install/dbperform.php?act=ct"; } } return false; @@ -93,7 +93,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'] = "$webimroot/install/dbperform.php?act=droptables"; + $page['nextstepurl'] = "$webimroot/install/dbperform.php?act=dt"; $page['nextnotice'] = getlocal("install.kill_tables.notice"); return false; }