Project:Event
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

Dear all,

I would like to propose a few PostgreSQL fixes.

The first is quiteforward:

warning: pg_query() [function.pg-query]: Query failed: ERREUR:
l'opérateur n'existe pas : character varying = integer LINE 1: UPDATE
users SET timezone_id = 314 WHERE timezone = 3600 AND... ^ HINT: Aucun
opérateur ne correspond au nom donné et aux types d'arguments. Vous
devez ajouter des conversions explicites de type.
in xxxxxxxxxx/includes/database.pgsql.inc on line 139.
user warning: query: UPDATE users SET timezone_id = 314 WHERE timezone =
3600 AND timezone_id = 0

In the table users, timezone is a varchar.
Therefore, the event.module 276 line should be:
db_query("UPDATE {users} SET timezone_id = %d WHERE timezone = '%d' AND timezone_id = 0", $timezone_id, $user->timezone);

Patch attached.

AttachmentSize
event-postgresql-001.diff671 bytes