aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-06-23 21:41:04 +0200
committerJoas Schilling <nickvergessen@gmx.de>2014-06-23 21:41:04 +0200
commit3fd7fd435db3a580fed329bea74ab30cbb4d14a2 (patch)
tree22587fcebaa6d82fbfe46fab4802dff9cab0fccc /phpBB
parente45cd32de7617be07557d7d8ccf4a8715717b0df (diff)
downloadforums-3fd7fd435db3a580fed329bea74ab30cbb4d14a2.tar
forums-3fd7fd435db3a580fed329bea74ab30cbb4d14a2.tar.gz
forums-3fd7fd435db3a580fed329bea74ab30cbb4d14a2.tar.bz2
forums-3fd7fd435db3a580fed329bea74ab30cbb4d14a2.tar.xz
forums-3fd7fd435db3a580fed329bea74ab30cbb4d14a2.zip
[ticket/12763] Remove empty schema files
PHPBB3-12763
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/install/install_install.php24
-rw-r--r--phpBB/install/schemas/firebird_schema.sql5
-rw-r--r--phpBB/install/schemas/mssql_schema.sql8
-rw-r--r--phpBB/install/schemas/mysql_40_schema.sql5
-rw-r--r--phpBB/install/schemas/mysql_41_schema.sql5
-rw-r--r--phpBB/install/schemas/sqlite_schema.sql5
6 files changed, 14 insertions, 38 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');
diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql
deleted file mode 100644
index 28649dc54c..0000000000
--- a/phpBB/install/schemas/firebird_schema.sql
+++ /dev/null
@@ -1,5 +0,0 @@
-# DO NOT EDIT THIS FILE, IT IS GENERATED
-#
-# To change the contents of this file, edit
-# phpBB/develop/create_schema_files.php and
-# run it.
diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql
deleted file mode 100644
index f88513cf0e..0000000000
--- a/phpBB/install/schemas/mssql_schema.sql
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
- * DO NOT EDIT THIS FILE, IT IS GENERATED
- *
- * To change the contents of this file, edit
- * phpBB/develop/create_schema_files.php and
- * run it.
- */
-
diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql
deleted file mode 100644
index 28649dc54c..0000000000
--- a/phpBB/install/schemas/mysql_40_schema.sql
+++ /dev/null
@@ -1,5 +0,0 @@
-# DO NOT EDIT THIS FILE, IT IS GENERATED
-#
-# To change the contents of this file, edit
-# phpBB/develop/create_schema_files.php and
-# run it.
diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql
deleted file mode 100644
index 28649dc54c..0000000000
--- a/phpBB/install/schemas/mysql_41_schema.sql
+++ /dev/null
@@ -1,5 +0,0 @@
-# DO NOT EDIT THIS FILE, IT IS GENERATED
-#
-# To change the contents of this file, edit
-# phpBB/develop/create_schema_files.php and
-# run it.
diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql
deleted file mode 100644
index 28649dc54c..0000000000
--- a/phpBB/install/schemas/sqlite_schema.sql
+++ /dev/null
@@ -1,5 +0,0 @@
-# DO NOT EDIT THIS FILE, IT IS GENERATED
-#
-# To change the contents of this file, edit
-# phpBB/develop/create_schema_files.php and
-# run it.