Skip to content

Commit

Permalink
Fix sql query in announcement see BT # 11631
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Sep 7, 2016
1 parent dc6a05c commit 5bed3f8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions main/inc/lib/AnnouncementManager.php
Expand Up @@ -192,8 +192,8 @@ public static function getAnnouncementInfoById($announcementId, $courseId, $user
$dql = "SELECT CA, IP
FROM ChamiloCourseBundle:CAnnouncement CA, ChamiloCourseBundle:CItemProperty IP
WHERE
CA.iid = IP.ref AND
CA.iid = :announcement AND
CA.id = IP.ref AND
CA.id = :announcement AND
IP.tool = 'announcement' AND
CA.cId = IP.course AND
CA.cId = :course
Expand All @@ -209,8 +209,8 @@ public static function getAnnouncementInfoById($announcementId, $courseId, $user
$dql = "SELECT CA, IP
FROM ChamiloCourseBundle:CAnnouncement CA, ChamiloCourseBundle:CItemProperty IP
WHERE
CA.iid = IP.ref AND
CA.iid = :announcement AND
CA.id = IP.ref AND
CA.id = :announcement AND
IP.tool='announcement' AND
(
IP.toUser = $userId OR
Expand All @@ -225,8 +225,8 @@ public static function getAnnouncementInfoById($announcementId, $courseId, $user
$dql = "SELECT CA, IP
FROM ChamiloCourseBundle:CAnnouncement CA, ChamiloCourseBundle:CItemProperty IP
WHERE
CA.iid = IP.ref AND
CA.iid = :announcement AND
CA.id = IP.ref AND
CA.id = :announcement AND
IP.tool = 'announcement' AND
(IP.group = '0' OR IP.group IS NULL) AND
IP.visibility = '1' AND
Expand Down

0 comments on commit 5bed3f8

Please sign in to comment.