[patch] getTicketsByProperties() fix.
"Jason M. Felice" <[email protected]>
| Newsgroups | gmane.comp.horde.whups |
|---|---|
| Message-ID | <[email protected]> |
The owner criteria was broke a little bit back. This fixes it, but it doesn't take into account groups (I have no idea how that works). -- Jason M. Felice Cronosys, LLC <http://www.cronosys.com/> 216.221.4600 x302 -- Whups mailing list Frequently Asked Questions: http://horde.org/faq/ To unsubscribe, mail: [email protected]
nag-whups-tickets-fix.diff
(text/plain, 1.3 KB)
Index: whups/lib/Driver/sql.php
===================================================================
RCS file: /repository/whups/lib/Driver/sql.php,v
retrieving revision 1.123
diff -u -r1.123 sql.php
--- whups/lib/Driver/sql.php 8 Aug 2003 12:55:08 -0000 1.123
+++ whups/lib/Driver/sql.php 11 Aug 2003 03:17:02 -0000
@@ -726,10 +726,10 @@
// Handle owner properties.
if (isset($info['owner'])) {
- $join .= ' INNER JOIN whups_ticket_owners ON whups_tickets.ticket_id = whups_ticket_owners.ticket_id AND whups_ticket_owners.ticket_owner = ' . $this->_db->quote($info['owner']);
+ $join .= ' INNER JOIN whups_ticket_owners ON whups_tickets.ticket_id = whups_ticket_owners.ticket_id AND whups_ticket_owners.ticket_owner = ' . $this->_db->quote('user:' . $info['owner']);
}
if (isset($info['notowner'])) {
- $join .= ' LEFT JOIN whups_ticket_owners ON whups_tickets.ticket_id = whups_ticket_owners.ticket_id AND whups_ticket_owners.ticket_owner = ' . $this->_db->quote($info['notowner']);
+ $join .= ' LEFT JOIN whups_ticket_owners ON whups_tickets.ticket_id = whups_ticket_owners.ticket_id AND whups_ticket_owners.ticket_owner = ' . $this->_db->quote('user:' . $info['notowner']);
$where = $this->_addWhere($where, 1, 'whups_ticket_owners.ticket_id IS NULL');
}