Skip to content

Commit

Permalink
Merge pull request #443 from gmambro/master
Browse files Browse the repository at this point in the history
Dev: this fix a check which will prevent "any user" shares in CPDB
  • Loading branch information
LouisGac committed Feb 17, 2016
2 parents d015c30 + c1ad4a7 commit 35aff4f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions application/controllers/admin/participantsaction.php
Expand Up @@ -746,7 +746,7 @@ function getSearchIDs()
*/
function exporttocsv()
{
if (Yii::app()->request->getPost('searchcondition','') != '') // if there is a search condition then only the participants that match the search criteria are counted
if (Yii::app()->request->getPost('searchcondition','') !== '') // if there is a search condition then only the participants that match the search criteria are counted
{
$condition = explode("%7C%7C", Yii::app()->request->getPost('searchcondition',''));
$search = Participant::model()->getParticipantsSearchMultipleCondition($condition);
Expand Down Expand Up @@ -1479,7 +1479,8 @@ function shareParticipants()
}

$i = 0;
if (Permission::model()->hasGlobalPermission('participantpanel','update') && $iShareUserId>0)
// $iShareUserId == 0 means any user
if (Permission::model()->hasGlobalPermission('participantpanel','update') && $iShareUserId !== '')
foreach ($iParticipantId as $iId)
{
$time = time();
Expand Down

0 comments on commit 35aff4f

Please sign in to comment.