This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".
The branch, master has been updated
via e0fcdb7bca7c3f2e174bfff09de52bcdbc4809d3 (commit)
from b716819e77e1905f1358c6f29684368613e2911b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=e0fcdb7bca7c3f2e174bfff09de52bcdbc4809d3
commit e0fcdb7bca7c3f2e174bfff09de52bcdbc4809d3
Author: Franck Villaume <[email protected]>
Date: Tue Mar 21 08:06:20 2017 +0100
revert part of modification on db_insert. the enhancement just breaks
everything.
diff --git a/src/common/include/database-pgsql.php
b/src/common/include/database-pgsql.php
index d914613..ee906f3 100644
--- a/src/common/include/database-pgsql.php
+++ b/src/common/include/database-pgsql.php
@@ -638,8 +638,8 @@ function db_fetch_array_by_row($qhandle, $row) {
* @return int id of the primary key or 0 on failure.
*/
function db_insertid($qhandle, $table_name, $pkey_field_name, $dbserver =
NULL) {
- $sql = 'SELECT currval(pg_get_serial_sequence($1, $2)) AS id';
- $res = db_query_params($sql, array($table_name, $pkey_field_name), -1,
0, $dbserver);
+ $sql = "SELECT max($pkey_field_name) AS id FROM $table_name";
+ $res = db_query_params($sql, array(), -1, 0, $dbserver);
if (db_numrows($res) > 0) {
return db_result($res, 0, 'id');
} else {
-----------------------------------------------------------------------
Summary of changes:
src/common/include/database-pgsql.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits