[whups] [patch] getTicketsByProperties() fix.

Jason M. Felice jfelice at cronosys.com
Sun Aug 10 20:19:23 PDT 2003


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
-------------- next part --------------
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');
         }
 


More information about the whups mailing list