[Tickets #10171] Re: SQL-Problems during sync
bugs at horde.org
bugs at horde.org
Wed Jun 15 10:34:04 UTC 2011
BITTE NICHT AUF DIESE NACHRICHT ANTWORTEN. NACHRICHTEN AN DIESE
E-MAIL-ADRESSE WERDEN NICHT GELESEN.
Ticket-URL: http://bugs.horde.org/ticket/10171
------------------------------------------------------------------------------
Ticket | 10171
Aktualisiert Von | piper at hrz.uni-marburg.de
Zusammenfassung | SQL-Problems during sync
Warteschlange | Kronolith
Version | 3.0.2
Typ | Bug
Status | Feedback
Priorität | 1. Low
Milestone |
Patch |
Zuständige |
+Neue Anlage | content_lib_Objects_Manager.patch
------------------------------------------------------------------------------
piper at hrz.uni-marburg.de (2011-06-15 10:34) hat geschrieben:
I observe the same error (Horde 4.0.6, kronolith 3.0.4, postgresql
8.4) when upgrading from kronolith-H3 with event-uid-entrys of all
numbers (mis-interpreted as integer). The reason seems to be a missing
quotation of $objectName (here the event_uid) in line 116 to 118 in
/var/www/horde/content/lib/Objects/Manager.php:
foreach ($this->_db->selectAll('SELECT object_id, object_name FROM ' .
$this->_t('objects')
. ' WHERE object_name IN (' . implode(',', array_map(array($this->_db,
'quote'), array_keys($objectName)))
. ') AND type_id = ' . $type) as $row) {
If I leave out the mapping to array($this->_db, 'quote') and
hard-encode the quotes, it solves the problem for me:
foreach ($this->_db->selectAll("SELECT object_id, object_name FROM " .
$this->_t('objects')
. " WHERE object_name IN ('" . implode("','", array_keys($objectName))
. "') AND type_id = " . $type) as $row) {
(see also appended patch).
I have no idea if this does work with other DB-backends too, though,
as I don't really understand the use of the 'quote'-mapping in the
first place.
Andreas
More information about the bugs
mailing list