if ($user->isAnonymous()) {␊ |
$sql = sprintf('%s=%s', $db->qn('private'), $false);␊ |
return Pluf::factory('IDF_Project')->getList(array('filter'=> $sql,␊ |
'order' => 'shortname ASC'));␊ |
'order' => 'name ASC'));␊ |
}␊ |
if ($user->administrator) {␊ |
return Pluf::factory('IDF_Project')->getList(array('order' => 'shortname ASC'));␊ |
return Pluf::factory('IDF_Project')->getList(array('order' => 'name ASC'));␊ |
}␊ |
// grab the list of projects where the user is admin, member␊ |
// or authorized␊ |
|
$sql .= sprintf(' OR id IN (%s)', implode(', ', $ids));␊ |
}␊ |
return Pluf::factory('IDF_Project')->getList(array('filter' => $sql,␊ |
'order' => 'shortname ASC'));␊ |
'order' => 'name ASC'));␊ |
}␊ |
} |