aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db/postgres.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2010-03-02 01:05:34 +0100
committerNils Adermann <naderman@naderman.de>2010-03-02 01:05:34 +0100
commit517f25353246f06eec7d1fdef90a04119a45bbbf (patch)
tree7837b0e54fcd05f2f49a22a078b0f12cad864b30 /phpBB/includes/db/postgres.php
parent89b37954f994a7cd517553d2d16686f91dcaae72 (diff)
parent7068d8b462e388ea87883c5203a28fa6a8e4b6dc (diff)
downloadforums-517f25353246f06eec7d1fdef90a04119a45bbbf.tar
forums-517f25353246f06eec7d1fdef90a04119a45bbbf.tar.gz
forums-517f25353246f06eec7d1fdef90a04119a45bbbf.tar.bz2
forums-517f25353246f06eec7d1fdef90a04119a45bbbf.tar.xz
forums-517f25353246f06eec7d1fdef90a04119a45bbbf.zip
Merge commit 'release-3.0-B5'
Diffstat (limited to 'phpBB/includes/db/postgres.php')
-rw-r--r--phpBB/includes/db/postgres.php27
1 files changed, 10 insertions, 17 deletions
diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/postgres.php
index c06786a795..f2e96260ba 100644
--- a/phpBB/includes/db/postgres.php
+++ b/phpBB/includes/db/postgres.php
@@ -192,26 +192,19 @@ class dbal_postgres extends dbal
/**
* Build LIMIT query
*/
- function sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)
+ function _sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)
{
- if ($query != '')
- {
- $this->query_result = false;
-
- // if $total is set to 0 we do not want to limit the number of rows
- if ($total == 0)
- {
- $total = -1;
- }
+ $this->query_result = false;
- $query .= "\n LIMIT $total OFFSET $offset";
-
- return $this->sql_query($query, $cache_ttl);
- }
- else
+ // if $total is set to 0 we do not want to limit the number of rows
+ if ($total == 0)
{
- return false;
+ $total = -1;
}
+
+ $query .= "\n LIMIT $total OFFSET $offset";
+
+ return $this->sql_query($query, $cache_ttl);
}
/**
@@ -275,7 +268,7 @@ class dbal_postgres extends dbal
if (preg_match("/^INSERT[\t\n ]+INTO[\t\n ]+([a-z0-9\_\-]+)/is", $this->last_query_text, $tablename))
{
$query = "SELECT currval('" . $tablename[1] . "_seq') AS last_value";
- $temp_q_id = @pg_query($this->db_connect_id, $query);
+ $temp_q_id = @pg_query($this->db_connect_id, $query);
if (!$temp_q_id)
{