diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index b1a2d244cd..c789458494 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -131,6 +131,7 @@
  • [Fix] Cursor Jumps on New Topic in IE (Bug #42455 - Patch by TerraFrost)
  • [Fix] Add indicator to be used in code if session was created (user visits the site for the first time).
  • [Fix] Correctly count topic views for guests visiting the website the first time by entering the topic directly (Bug #43445)
  • +
  • [Fix] Fix bug in postgresql db layer for LIMIT ALL clauses (reported by JRSweets)
  • [Change] Allow download of conflicting file for later reference in automatic updater
  • [Change] Default difference view is now 'inline' instead of 'side by side'
  • [Change] Added new option for merging differences to conflicting files in automatic updater
  • diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/postgres.php index 83678e2904..d117e8c948 100644 --- a/phpBB/includes/db/postgres.php +++ b/phpBB/includes/db/postgres.php @@ -26,7 +26,7 @@ include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx); class dbal_postgres extends dbal { var $last_query_text = ''; - + /** * Connect to server */ @@ -55,7 +55,7 @@ class dbal_postgres extends dbal { $connect_string .= "host=$sqlserver "; } - + if ($port) { $connect_string .= "port=$port "; @@ -224,7 +224,7 @@ class dbal_postgres extends dbal // if $total is set to 0 we do not want to limit the number of rows if ($total == 0) { - $total = -1; + $total = 'ALL'; } $query .= "\n LIMIT $total OFFSET $offset"; diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 0639f41b35..42af092d8b 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -947,7 +947,11 @@ function change_database_data(&$no_updates, $version) FROM ' . ACL_OPTIONS_TABLE . " WHERE auth_option = '" . $db->sql_escape($option) . "' ORDER BY auth_option_id DESC"; - $result = $db->sql_query_limit($sql, 0, 1); + // sql_query_limit not possible here, due to bug in postgresql layer + $result = $db->sql_query($sql); + + // Skip first row, this is our original auth option we want to preserve + $row = $db->sql_fetchrow($result); while ($row = $db->sql_fetchrow($result)) {