aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/install_install.php
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2014-06-24 00:19:30 +0200
committerAndreas Fischer <bantu@phpbb.com>2014-06-24 00:19:30 +0200
commitba456bb00ea161ff17311689cdc4bcc8657bb32d (patch)
treea0f9297d59151bd864f193181fd9959ecdb500f8 /phpBB/install/install_install.php
parent83326718132811d8b57ac8612ff50887ec0fa101 (diff)
parent307c9bc15f2ff33222375ba53b0e9979aef35f22 (diff)
downloadforums-ba456bb00ea161ff17311689cdc4bcc8657bb32d.tar
forums-ba456bb00ea161ff17311689cdc4bcc8657bb32d.tar.gz
forums-ba456bb00ea161ff17311689cdc4bcc8657bb32d.tar.bz2
forums-ba456bb00ea161ff17311689cdc4bcc8657bb32d.tar.xz
forums-ba456bb00ea161ff17311689cdc4bcc8657bb32d.zip
Merge pull request #2643 from nickvergessen/ticket/12763
Ticket/12763 Do not regenerate the *_schema.sql files * nickvergessen/ticket/12763: [ticket/12763] Remove invalid comment from oracle and postgres *_schema.sql [ticket/12763] Remove empty schema files [ticket/12763] Do not regenerate the *_schema.sql files
Diffstat (limited to 'phpBB/install/install_install.php')
-rw-r--r--phpBB/install/install_install.php24
1 files changed, 14 insertions, 10 deletions
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index 576cbba3ca..5f8c0c277c 100644
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -1153,21 +1153,25 @@ class install_install extends module
// How should we treat this schema?
$delimiter = $available_dbms[$data['dbms']]['DELIM'];
- $sql_query = @file_get_contents($dbms_schema);
- $sql_query = preg_replace('#phpbb_#i', $data['table_prefix'], $sql_query);
- $sql_query = phpbb_remove_comments($sql_query);
- $sql_query = split_sql_file($sql_query, $delimiter);
- foreach ($sql_query as $sql)
+ if (file_exists($dbms_schema))
{
- //$sql = trim(str_replace('|', ';', $sql));
- if (!$db->sql_query($sql))
+ $sql_query = @file_get_contents($dbms_schema);
+ $sql_query = preg_replace('#phpbb_#i', $data['table_prefix'], $sql_query);
+ $sql_query = phpbb_remove_comments($sql_query);
+ $sql_query = split_sql_file($sql_query, $delimiter);
+
+ foreach ($sql_query as $sql)
{
- $error = $db->sql_error();
- $this->p_master->db_error($error['message'], $sql, __LINE__, __FILE__);
+ //$sql = trim(str_replace('|', ';', $sql));
+ if (!$db->sql_query($sql))
+ {
+ $error = $db->sql_error();
+ $this->p_master->db_error($error['message'], $sql, __LINE__, __FILE__);
+ }
}
+ unset($sql_query);
}
- unset($sql_query);
// Ok we have the db info go ahead and work on building the table
$db_table_schema = @file_get_contents('schemas/schema.json');