aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/install_install.php
diff options
context:
space:
mode:
authorDavid M <davidmj@users.sourceforge.net>2006-04-28 02:18:17 +0000
committerDavid M <davidmj@users.sourceforge.net>2006-04-28 02:18:17 +0000
commit1b065fb74afedf2513d5dab4726516f8778cdf9d (patch)
tree285463e55c845c21a548f4aed58d588b6c0ee31b /phpBB/install/install_install.php
parent5994371c0a098bf2f866b89ba0a8bba11f414a41 (diff)
downloadforums-1b065fb74afedf2513d5dab4726516f8778cdf9d.tar
forums-1b065fb74afedf2513d5dab4726516f8778cdf9d.tar.gz
forums-1b065fb74afedf2513d5dab4726516f8778cdf9d.tar.bz2
forums-1b065fb74afedf2513d5dab4726516f8778cdf9d.tar.xz
forums-1b065fb74afedf2513d5dab4726516f8778cdf9d.zip
Viewtopic:
- PGSQL friendly New Install: - file_get_contents New/Old Install: - remove remarks for PGSQL, some versions don't like 'em - fixed the regex in remove_remarks - rewrote split_sql_file Schema: - removed explicit inserts, replaced with implicit inserts. This is more friendly to our non auto incrementing friends. (One set of data is not fixed yet, the modules table) - removed all those SELECT SETVAL statements, they were not needed. git-svn-id: file:///svn/phpbb/trunk@5854 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/install/install_install.php')
-rwxr-xr-xphpBB/install/install_install.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index 2c67ca6172..116fc7f2f6 100755
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -898,8 +898,8 @@ class install_install extends module
$remove_remarks = $this->available_dbms[$dbms]['COMMENTS'];
$delimiter = $this->available_dbms[$dbms]['DELIM'];
- $sql_query = @fread(@fopen($dbms_schema, 'r'), @filesize($dbms_schema));
- $sql_query = preg_replace('#phpbb_#is', $table_prefix, $sql_query);
+ $sql_query = @file_get_contents($dbms_schema);
+ $sql_query = preg_replace('#phpbb_#i', $table_prefix, $sql_query);
$remove_remarks($sql_query);
@@ -917,7 +917,7 @@ class install_install extends module
unset($sql_query);
// Ok tables have been built, let's fill in the basic information
- $sql_query = fread(fopen('schemas/schema_data.sql', 'r'), filesize('schemas/schema_data.sql'));
+ $sql_query = file_get_contents('schemas/schema_data.sql');
// Deal with any special comments, used at present for mssql set identity switching
switch ($dbms)
@@ -929,6 +929,8 @@ class install_install extends module
case 'postgres':
$sql_query = preg_replace('#\# POSTGRES (BEGIN|COMMIT) \##s', '\1; ', $sql_query);
+ // Some versions of PGSQL don't like remarks, lets remove them.
+ remove_remarks($sql_query);
break;
case 'firebird':
@@ -943,7 +945,7 @@ class install_install extends module
//$sql_query = preg_replace('#\# MSSQL IDENTITY (phpbb_[a-z_]+) (ON|OFF) \##s', '', $sql_query);
}
- $sql_query = preg_replace('#phpbb_#', $table_prefix, $sql_query);
+ $sql_query = preg_replace('#phpbb_#i', $table_prefix, $sql_query);
$remove_remarks($sql_query);
$sql_query = split_sql_file($sql_query, ';');