X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fdb%2FDatabasePostgres.php;h=839d6a0ec2633ff0f278f75b3a7fe6a89484ec4c;hb=ca831d5f4535146dc1ddd19059d981f4deb01126;hp=d42871057cfbb4d91e7171f4a05d9ecd3f045fd9;hpb=3071f1fad720f1773864621158a0c59b73124896;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php index d42871057c..839d6a0ec2 100644 --- a/includes/db/DatabasePostgres.php +++ b/includes/db/DatabasePostgres.php @@ -392,9 +392,7 @@ class DatabasePostgres extends Database { } public function doQuery( $sql ) { - if ( function_exists( 'mb_convert_encoding' ) ) { - $sql = mb_convert_encoding( $sql, 'UTF-8' ); - } + $sql = mb_convert_encoding( $sql, 'UTF-8' ); // Clear previously left over PQresult while ( $res = pg_get_result( $this->mConn ) ) { pg_free_result( $res ); @@ -840,7 +838,7 @@ __INDEXATTR__; $tempres = (bool)$this->query( $tempsql, $fname, $savepoint ); if ( $savepoint ) { - $bar = pg_last_error(); + $bar = pg_result_error( $this->mLastResult ); if ( $bar != false ) { $savepoint->rollback(); } else { @@ -865,7 +863,7 @@ __INDEXATTR__; $sql .= '(' . $this->makeList( $args ) . ')'; $res = (bool)$this->query( $sql, $fname, $savepoint ); if ( $savepoint ) { - $bar = pg_last_error(); + $bar = pg_result_error( $this->mLastResult ); if ( $bar != false ) { $savepoint->rollback(); } else { @@ -948,7 +946,7 @@ __INDEXATTR__; $res = (bool)$this->query( $sql, $fname, $savepoint ); if ( $savepoint ) { - $bar = pg_last_error(); + $bar = pg_result_error( $this->mLastResult ); if ( $bar != false ) { $savepoint->rollback(); } else {