From de0a46a9bf298eb8603e878393c70391ca420693 Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Mon, 27 Jul 2015 11:31:36 -0500
Subject: [PATCH] canned: Show department-specific canned responses

---
 include/class.canned.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/class.canned.php b/include/class.canned.php
index affa59d9f..a272011a5 100644
--- a/include/class.canned.php
+++ b/include/class.canned.php
@@ -226,10 +226,10 @@ extends VerySimpleModel {
             ->values_flat('canned_id', 'title');
 
         if ($deptId) {
-            $depts = Q::any(array('dept_id' => $deptId));
+            $depts = array($deptId);
             if (!$explicit)
-                $depts->add(array('dept_id' => 0));
-            $canned->filter($depts);
+                $depts[] = 0;
+            $canned->filter(array('dept_id__in' => $depts));
         }
 
         $responses = array();
-- 
GitLab