1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 08:47:45 +02:00

[ticket/12763] Remove empty schema files

PHPBB3-12763
This commit is contained in:
Joas Schilling
2014-06-23 21:41:04 +02:00
parent e45cd32de7
commit 3fd7fd435d
7 changed files with 24 additions and 45 deletions

View File

@@ -342,14 +342,17 @@ class phpbb_database_test_connection_manager
$filename = $directory . $schema . '_schema.sql';
$queries = file_get_contents($filename);
$sql = phpbb_remove_comments($queries);
$sql = split_sql_file($sql, $this->dbms['DELIM']);
foreach ($sql as $query)
if (file_exists($filename))
{
$this->pdo->exec($query);
$queries = file_get_contents($filename);
$sql = phpbb_remove_comments($queries);
$sql = split_sql_file($sql, $this->dbms['DELIM']);
foreach ($sql as $query)
{
$this->pdo->exec($query);
}
}
// Ok we have the db info go ahead and work on building the table