Modif chargement des tables

This commit is contained in:
Rodolphe Quiedeville 2004-11-27 16:15:55 +00:00
parent 0e5dfd4a16
commit 0be0a1ff14

View File

@ -106,7 +106,7 @@ if ($_POST["action"] == "set")
$table_exists = 0; $table_exists = 0;
while (($file = readdir($handle))!==false) while (($file = readdir($handle))!==false)
{ {
if (substr($file, strlen($file) - 4) == '.sql' && substr($file,0,4) == 'llx_') if (substr($file, strlen($file) - 4) == '.sql' && substr($file,0,4) == 'llx_' && substr($file, - 8) <> '.key.sql')
{ {
$name = substr($file, 0, strlen($file) - 4); $name = substr($file, 0, strlen($file) - 4);
//print "<tr><td>Création de la table $name</td>"; //print "<tr><td>Création de la table $name</td>";
@ -116,7 +116,11 @@ if ($_POST["action"] == "set")
{ {
while (!feof ($fp)) while (!feof ($fp))
{ {
$buffer .= fgets($fp, 4096); $buf = fgets($fp, 4096);
if (substr($buf, 0, 2) <> '--')
{
$buffer .= $buf;
}
} }
fclose($fp); fclose($fp);
} }