mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-12 11:44:08 +02:00
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
This commit is contained in:
@@ -199,7 +199,14 @@ class dbal
|
||||
}
|
||||
else if (is_string($var))
|
||||
{
|
||||
$values[] = "'" . $this->sql_escape($var) . "'";
|
||||
if (strpos($key, 'bitfield') === false)
|
||||
{
|
||||
$values[] = "'" . $this->sql_escape($var) . "'";
|
||||
}
|
||||
else
|
||||
{
|
||||
$values[] = $this->sql_escape_binary($var);
|
||||
}
|
||||
}
|
||||
else if (is_array($var) && is_string($var[0]))
|
||||
{
|
||||
@@ -228,7 +235,14 @@ class dbal
|
||||
}
|
||||
else if (is_string($var))
|
||||
{
|
||||
$values[] = "'" . $this->sql_escape($var) . "'";
|
||||
if (strpos($key, 'bitfield') === false)
|
||||
{
|
||||
$values[] = "'" . $this->sql_escape($var) . "'";
|
||||
}
|
||||
else
|
||||
{
|
||||
$values[] = $this->sql_escape_binary($var);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -251,7 +265,14 @@ class dbal
|
||||
}
|
||||
else if (is_string($var))
|
||||
{
|
||||
$values[] = "$key = '" . $this->sql_escape($var) . "'";
|
||||
if (strpos($key, 'bitfield') === false)
|
||||
{
|
||||
$values[] = "$key = '" . $this->sql_escape($var) . "'";
|
||||
}
|
||||
else
|
||||
{
|
||||
$values[] = "$key = " . $this->sql_escape_binary($var);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -264,6 +285,11 @@ class dbal
|
||||
return $query;
|
||||
}
|
||||
|
||||
function sql_escape_binary($msg)
|
||||
{
|
||||
return "'" . $this->sql_escape($msg) . "'";
|
||||
}
|
||||
|
||||
/**
|
||||
* Build sql statement from array for select and select distinct statements
|
||||
*
|
||||
|
Reference in New Issue
Block a user