2011-05-12 Juan Manuel Ramon <juanmanuel.ramon@artica.es>

* install.php: Correct a mistake that doesn't allow to create a 
	new database when drop database option is checked.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4339 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
juanmanuelr 2011-05-12 08:13:50 +00:00
parent 475309f2f0
commit bafaf65dc1
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2011-05-12 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* install.php: Correct a mistake that doesn't allow to create a
new database when drop database option is checked.
2011-05-11 Miguel de Dios <miguel.dedios@artica.es>
* operation/search_modules.php, operation/search_agents.php,

View File

@ -701,7 +701,7 @@ function install_step4() {
}
// Create schema
if ($dbaction != 'db_exist'){
if ($dbaction != 'db_exist' || $dbdrop == 1){
$step1 = mysql_query ("CREATE DATABASE $dbname");
check_generic ($step1, "Creating database '$dbname'");
}
@ -839,7 +839,7 @@ function install_step4() {
$result = pg_query($connection, "DROP DATABASE \"" . $dbname . "\";");
}
if ($dbaction != 'db_exist'){
if ($dbaction != 'db_exist' || $dbdrop == 1){
pg_send_query($connection, "CREATE DATABASE \"" . $dbname . "\" WITH ENCODING 'utf8';");
$result = pg_get_result($connection);
if (pg_result_status($result) != PGSQL_FATAL_ERROR) {