diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-02-16 10:26:52 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-02-16 10:26:52 +0000 |
commit | f2f0dc78929228619f8644d6553a02a8d1572242 (patch) | |
tree | 42cd23d2950ee115ca96814f516d13deeac1fea4 /phpBB | |
parent | 2ec9c9c82c2fdba1056bbab3d17041a06daf99aa (diff) | |
download | forums-f2f0dc78929228619f8644d6553a02a8d1572242.tar forums-f2f0dc78929228619f8644d6553a02a8d1572242.tar.gz forums-f2f0dc78929228619f8644d6553a02a8d1572242.tar.bz2 forums-f2f0dc78929228619f8644d6553a02a8d1572242.tar.xz forums-f2f0dc78929228619f8644d6553a02a8d1572242.zip |
- only minor adjustements (we are now able to use other functions due to the increased php requirements)
git-svn-id: file:///svn/phpbb/trunk@5557 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/db/mssql.php | 6 | ||||
-rw-r--r-- | phpBB/includes/db/mysql.php | 7 | ||||
-rw-r--r-- | phpBB/includes/db/mysql4.php | 7 | ||||
-rw-r--r-- | phpBB/includes/db/postgres.php | 10 |
4 files changed, 20 insertions, 10 deletions
diff --git a/phpBB/includes/db/mssql.php b/phpBB/includes/db/mssql.php index 636ce1e90c..ab58b657ac 100644 --- a/phpBB/includes/db/mssql.php +++ b/phpBB/includes/db/mssql.php @@ -203,7 +203,7 @@ class dbal_mssql extends dbal return $cache->sql_fetchrow($query_id); } - $row = @mssql_fetch_array($query_id, MSSQL_ASSOC); + $row = @mssql_fetch_assoc($query_id); // I hope i am able to remove this later... hopefully only a PHP or MSSQL bug if ($row) @@ -264,7 +264,7 @@ class dbal_mssql extends dbal $result_id = @mssql_query('SELECT @@IDENTITY', $this->db_connect_id); if ($result_id) { - if (@mssql_fetch_array($result_id, MSSQL_ASSOC)) + if (@mssql_fetch_assoc($result_id)) { $id = @mssql_result($result_id, 1); @mssql_free_result($result_id); @@ -340,7 +340,7 @@ class dbal_mssql extends dbal $endtime = $endtime[0] + $endtime[1]; $result = @mssql_query($query, $this->db_connect_id); - while ($void = @mssql_fetch_array($result, MSSQL_ASSOC)) + while ($void = @mssql_fetch_assoc($result)) { // Take the time spent on parsing rows into account } diff --git a/phpBB/includes/db/mysql.php b/phpBB/includes/db/mysql.php index 36dd73204c..e3f654fce5 100644 --- a/phpBB/includes/db/mysql.php +++ b/phpBB/includes/db/mysql.php @@ -276,7 +276,12 @@ class dbal_mysql extends dbal */ function sql_escape($msg) { - return mysql_escape_string($msg); + if (!$this->db_connect_id) + { + return @mysql_real_escape_string($msg); + } + + return @mysql_real_escape_string($msg, $this->db_connect_id); } /** diff --git a/phpBB/includes/db/mysql4.php b/phpBB/includes/db/mysql4.php index aa8e22c058..db2356d26d 100644 --- a/phpBB/includes/db/mysql4.php +++ b/phpBB/includes/db/mysql4.php @@ -279,7 +279,12 @@ class dbal_mysql4 extends dbal */ function sql_escape($msg) { - return mysql_escape_string($msg); + if (!$this->db_connect_id) + { + return @mysql_real_escape_string($msg); + } + + return @mysql_real_escape_string($msg, $this->db_connect_id); } /** diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/postgres.php index f371202578..e9d324e161 100644 --- a/phpBB/includes/db/postgres.php +++ b/phpBB/includes/db/postgres.php @@ -235,7 +235,7 @@ class dbal_postgres extends dbal return $cache->sql_fetchrow($query_id); } - return ($query_id) ? @pg_fetch_array($query_id, NULL, PGSQL_ASSOC) : false; + return ($query_id) ? @pg_fetch_assoc($query_id, NULL) : false; } /** @@ -295,7 +295,7 @@ class dbal_postgres extends dbal return false; } - $temp_result = @pg_fetch_array($temp_q_id, NULL, PGSQL_ASSOC); + $temp_result = @pg_fetch_assoc($temp_q_id, NULL); @pg_freeresult($query_id); return ($temp_result) ? $temp_result['last_value'] : false; @@ -328,7 +328,7 @@ class dbal_postgres extends dbal function sql_escape($msg) { // Do not use for bytea values - return pg_escape_string($msg); + return @pg_escape_string($msg); } /** @@ -338,7 +338,7 @@ class dbal_postgres extends dbal function _sql_error() { return array( - 'message' => @pg_errormessage(), + 'message' => (!$this->db_connect_id) ? @pg_last_error() : @pg_last_error($this->db_connect_id), 'code' => '' ); } @@ -368,7 +368,7 @@ class dbal_postgres extends dbal $endtime = $endtime[0] + $endtime[1]; $result = @pg_exec($this->db_connect_id, $query); - while ($void = @pg_fetch_array($result, NULL, PGSQL_ASSOC)) + while ($void = @pg_fetch_assoc($result, NULL)) { // Take the time spent on parsing rows into account } |