bro to_IDS and published flags fix on query. Now supporting block_event_proposals

pull/2002/head
ppanero 2017-03-01 10:20:33 +01:00
parent 3fca8de6bf
commit 61c5aa78ef
1 changed files with 1 additions and 1 deletions

View File

@ -1706,7 +1706,7 @@ class Attribute extends AppModel {
$intel = array();
foreach ($types as $type) {
//restricting to non-private or same org if the user is not a site-admin.
$conditions['AND'] = array('Attribute.to_ids =' => 1, 'Event.published =' => 1);
$conditions['AND'] = array('Attribute.to_ids' => 1, 'Event.published' => 1);
if ($from) $conditions['AND']['Event.date >='] = $from;
if ($to) $conditions['AND']['Event.date <='] = $to;
if ($last) $conditions['AND']['Event.publish_timestamp >='] = $last;