fix: Fixed "published":0 filter for restsearch

- also removed an empty function
pull/2379/merge
iglocska 2017-08-01 01:02:25 +02:00
parent 51be308d08
commit 3e4fbcf5ff
1 changed files with 1 additions and 5 deletions

View File

@ -1443,10 +1443,6 @@ class EventsController extends AppController {
$this->set('event', $this->Event->data);
}
public function massDelete() {
}
public function delete($id = null) {
if ($this->request->is('post') || $this->request->is('put') || $this->request->is('delete')) {
if (isset($this->request->data['id'])) {
@ -2644,7 +2640,7 @@ class EventsController extends AppController {
if ($publish_timestamp) $conditions = $this->Event->Attribute->setPublishTimestampConditions($publish_timestamp, $conditions);
if ($timestamp) $conditions = $this->Event->Attribute->setTimestampConditions($timestamp, $conditions);
if ($last) $conditions['AND'][] = array('Event.publish_timestamp >=' => $last);
if ($published) $conditions['AND'][] = array('Event.published' => $published);
if ($published !== false) $conditions['AND'][] = array('Event.published' => $published);
$params = array(
'conditions' => $conditions,
'fields' => array('DISTINCT(Attribute.event_id)'),