aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_forums.php
diff options
context:
space:
mode:
authorDavid M <davidmj@users.sourceforge.net>2006-08-06 05:52:41 +0000
committerDavid M <davidmj@users.sourceforge.net>2006-08-06 05:52:41 +0000
commit2f901a520326b4d6941ef18fcfce0a9d5ef9cea5 (patch)
tree7ef08c7f0bedfed5f6a65278c8dc53194ac16d20 /phpBB/includes/acp/acp_forums.php
parentb4b901b82552e639cae00c4dc38542cf6fe2d873 (diff)
downloadforums-2f901a520326b4d6941ef18fcfce0a9d5ef9cea5.tar
forums-2f901a520326b4d6941ef18fcfce0a9d5ef9cea5.tar.gz
forums-2f901a520326b4d6941ef18fcfce0a9d5ef9cea5.tar.bz2
forums-2f901a520326b4d6941ef18fcfce0a9d5ef9cea5.tar.xz
forums-2f901a520326b4d6941ef18fcfce0a9d5ef9cea5.zip
This should end some issues we have been having regarding the proper binary encoding of stuff. :D
Acyd Burn: quit breaking the schema :P git-svn-id: file:///svn/phpbb/trunk@6238 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_forums.php')
-rw-r--r--phpBB/includes/acp/acp_forums.php66
1 files changed, 1 insertions, 65 deletions
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
index ac461772d6..6fbe85450d 100644
--- a/phpBB/includes/acp/acp_forums.php
+++ b/phpBB/includes/acp/acp_forums.php
@@ -919,72 +919,8 @@ class acp_forums
$forum_id = $forum_data_sql['forum_id'];
unset($forum_data_sql['forum_id']);
- $query = '';
-
- switch (SQL_LAYER)
- {
- case 'mssql':
- case 'mssql_odbc':
- $values = array();
- foreach ($forum_data_sql as $key => $var)
- {
- if (is_null($var))
- {
- $values[] = "$key = NULL";
- }
- else if (is_string($var))
- {
- if ($key !== 'forum_desc_bitfield' && $key != 'forum_rules_bitfield')
- {
- $values[] = "$key = '" . $db->sql_escape($var) . "'";
- }
- else
- {
- $values[] = "$key = CAST('" . $var . "' AS varbinary)";
- }
- }
- else
- {
- $values[] = (is_bool($var)) ? "$key = " . intval($var) : "$key = $var";
- }
- }
- $query = implode(', ', $values);
- break;
-
- case 'sqlite':
- $values = array();
- foreach ($forum_data_sql as $key => $var)
- {
- if (is_null($var))
- {
- $values[] = "$key = NULL";
- }
- else if (is_string($var))
- {
- if ($key !== 'forum_desc_bitfield' && $key != 'forum_rules_bitfield')
- {
- $values[] = "$key = '" . $db->sql_escape($var) . "'";
- }
- else
- {
- $values[] = "$key = '" . sqlite_udf_encode_binary($var) . "'";
- }
- }
- else
- {
- $values[] = (is_bool($var)) ? "$key = " . intval($var) : "$key = $var";
- }
- }
- $query = implode(', ', $values);
- break;
-
- default:
- $query = $db->sql_build_array('UPDATE', $forum_data_sql);
- break;
- }
-
$sql = 'UPDATE ' . FORUMS_TABLE . '
- SET ' . $query . '
+ SET ' . $db->sql_build_array('UPDATE', $forum_data_sql) . '
WHERE forum_id = ' . $forum_id;
$db->sql_query($sql);