Fix: Quelques defauts mineurs dans gestion erreur de l'install

This commit is contained in:
Laurent Destailleur 2005-06-25 22:18:06 +00:00
parent ef71cf1404
commit 2d6ca716b0
2 changed files with 15 additions and 21 deletions

View File

@ -432,27 +432,12 @@ if ($_POST["action"] == "set")
} }
} }
if ($result == sizeof($sql))
{
if ($error == 0)
{
$db->query("DELETE FROM llx_const WHERE name='MAIN_NOT_INSTALLED'");
}
}
} }
/***************************************************************************************
*
*
*
*
***************************************************************************************/
print '</table>'; print '</table>';
$db->close(); $db->close();
} }
pFooter(!$ok); pFooter(!$ok);
?> ?>

View File

@ -95,7 +95,6 @@ if ($_POST["action"] == "set")
if ($resql) if ($resql)
{ {
$db->query("DELETE FROM llx_const WHERE name='MAIN_NOT_INSTALLED'");
print $langs->trans("AdminLoginCreatedSuccessfuly")."<br>"; print $langs->trans("AdminLoginCreatedSuccessfuly")."<br>";
$success = 1; $success = 1;
} }
@ -104,15 +103,25 @@ if ($_POST["action"] == "set")
if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS')
{ {
print $langs->trans("AdminLoginAlreadyExists",$_POST["login"])."<br>"; print $langs->trans("AdminLoginAlreadyExists",$_POST["login"])."<br>";
$success = 1;
} }
else { else {
print $langs->trans("FailedToCreateAdminLogin")."<br>"; print $langs->trans("FailedToCreateAdminLogin")."<br>";
} }
} }
// Si install non Français, on configure pour fonctionner en mode internationnal if ($success)
if ($langs->defaultlang != "fr_FR") { {
$db->query("INSERT INTO llx_const(name,value,type,visible) values ('COMPANY_CREATE_TWO_STEPS','1','yesno',0)"); $db->query("DELETE FROM llx_const WHERE name='MAIN_NOT_INSTALLED'");
// Si install non Français, on configure pour fonctionner en mode internationnal
if ($langs->defaultlang != "fr_FR") {
$db->query("INSERT INTO llx_const(name,value,type,visible) values ('COMPANY_CREATE_TWO_STEPS','1','yesno',0)");
$db->query("UPDATE llx_const set value='eldy.php' WHERE name='MAIN_MENU_BARRETOP';");
$db->query("UPDATE llx_const set value='eldy.php' WHERE name='MAIN_MENU_BARRELEFT';");
}
} }
print '</table>'; print '</table>';