diff --git a/htdocs/install/etape2.php b/htdocs/install/etape2.php index c1a7839cbc0..183ae7a7f75 100644 --- a/htdocs/install/etape2.php +++ b/htdocs/install/etape2.php @@ -117,12 +117,14 @@ if ($_POST["action"] == "set") $ok = 0; $handle=opendir($dir); dolibarr_install_syslog("Ouverture repertoire ".$dir." handle=".$handle,LOG_DEBUG); - $table_exists = 0; + $tablefound = 0; while (($file = readdir($handle))!==false) { if (eregi('\.sql$',$file) && eregi('^llx_',$file) && ! eregi('\.key\.sql$',$file)) { - $name = substr($file, 0, strlen($file) - 4); + $tablefound++; + + $name = substr($file, 0, strlen($file) - 4); $buffer = ''; $fp = fopen($dir.$file,"r"); if ($fp) @@ -178,12 +180,20 @@ if ($_POST["action"] == "set") } closedir($handle); - if ($error == 0) + if ($tablefound) { - print '