aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2009-04-28 11:18:02 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2009-04-28 11:18:02 +0000
commitab122983f740c7dbd1e962bb8306033ad4f3c360 (patch)
tree23a8dce43cf4a3b4f9aec86a1a34af9ffed8f305 /phpBB/includes
parent0f085848a661b5ffe5eff8bc842abfe625752bb3 (diff)
downloadforums-ab122983f740c7dbd1e962bb8306033ad4f3c360.tar
forums-ab122983f740c7dbd1e962bb8306033ad4f3c360.tar.gz
forums-ab122983f740c7dbd1e962bb8306033ad4f3c360.tar.bz2
forums-ab122983f740c7dbd1e962bb8306033ad4f3c360.tar.xz
forums-ab122983f740c7dbd1e962bb8306033ad4f3c360.zip
Fix column handling in db updater, custom profile fields an db tools for firebird DBMS (Bug #44555)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9492 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/acp/acp_profile.php2
-rw-r--r--phpBB/includes/acp/acp_users.php3
-rw-r--r--phpBB/includes/db/db_tools.php6
3 files changed, 6 insertions, 5 deletions
diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php
index 7ab6ff7cd6..2b5ec88e5b 100644
--- a/phpBB/includes/acp/acp_profile.php
+++ b/phpBB/includes/acp/acp_profile.php
@@ -1539,7 +1539,7 @@ class acp_profile
case 'firebird':
// We are defining the biggest common value, because of the possibility to edit the min/max values of each field.
- $sql = 'ALTER TABLE ' . PROFILE_FIELDS_DATA_TABLE . " ADD \"$field_ident\" ";
+ $sql = 'ALTER TABLE ' . PROFILE_FIELDS_DATA_TABLE . ' ADD "' . strtoupper($field_ident) . '" ';
switch ($field_type)
{
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index 57300be359..e5f83faec3 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -1162,7 +1162,8 @@ class acp_users
foreach ($cp_data as $key => $value)
{
- $cp_data[$left_delim . $key . $right_delim] = $value;
+ // Firebird is case sensitive with delimiter
+ $cp_data[$left_delim . (($db->sql_layer == 'firebird') ? strtoupper($key) : $key) . $right_delim] = $value;
unset($cp_data[$key]);
}
diff --git a/phpBB/includes/db/db_tools.php b/phpBB/includes/db/db_tools.php
index 70c946574b..b1a5d13d26 100644
--- a/phpBB/includes/db/db_tools.php
+++ b/phpBB/includes/db/db_tools.php
@@ -1115,7 +1115,7 @@ class phpbb_db_tools
switch ($this->sql_layer)
{
case 'firebird':
- $statements[] = 'ALTER TABLE "' . $table_name . '" ADD "' . $column_name . '" ' . $column_data['column_type_sql'];
+ $statements[] = 'ALTER TABLE ' . $table_name . ' ADD "' . strtoupper($column_name) . '" ' . $column_data['column_type_sql'];
break;
case 'mssql':
@@ -1207,7 +1207,7 @@ class phpbb_db_tools
switch ($this->sql_layer)
{
case 'firebird':
- $statements[] = 'ALTER TABLE "' . $table_name . '" DROP "' . $column_name . '"';
+ $statements[] = 'ALTER TABLE ' . $table_name . ' DROP "' . strtoupper($column_name) . '"';
break;
case 'mssql':
@@ -1626,7 +1626,7 @@ class phpbb_db_tools
{
case 'firebird':
// Change type...
- $statements[] = 'ALTER TABLE "' . $table_name . '" ALTER COLUMN "' . $column_name . '" TYPE ' . ' ' . $column_data['column_type_sql'];
+ $statements[] = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN "' . strtoupper($column_name) . '" TYPE ' . ' ' . $column_data['column_type_sql'];
break;
case 'mssql':