Skip to content

Commit

Permalink
Dev: Add extra condition to share search (CPDB)
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Sep 22, 2016
1 parent 7956ccf commit a1828b1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion application/models/ParticipantShare.php
Expand Up @@ -224,7 +224,10 @@ public function search()

$criteria=new CDbCriteria;
$criteria->with = array('participant','shared_by');
$criteria->compare('participant_id',$this->participant_id, false);

// This condition is necessary to filter out participants that got deleted, but the share entry is not
$criteria->addCondition('participant.participant_id = t.participant_id');

$criteria->compare('share_uid',$this->share_uid);
$criteria->compare('date_added',$this->date_added,true);
$criteria->compare('can_edit',$this->can_edit,true);
Expand Down

0 comments on commit a1828b1

Please sign in to comment.