Example #1
0
    exit;
}
// if private project, limit access to invited users, members, and admins
// and exclude banned members
if ($project->getPrivate()) {
    if (!Session::isAdmin() && !$project->isCreator(Session::getUserID())) {
        if (!$project->isInvited(Session::getUserID()) && !$project->isMember(Session::getUserID()) && !$project->isTrusted(Session::getUserID()) || ProjectUser::isBanned(Session::getUserID(), $project->getID())) {
            header('Location: ' . Url::error());
            exit;
        }
    }
}
// get update comments
$comments = Comment::getByUpdateID($update->getID());
// get events
$events = Event::getUpdateEvents($update->getID(), 5);
// get uploads
$uploads = Upload::getByUpdateID($updateID, false);
// $username = Filter::text($_GET['u']);
// $user = User::loadByUsername($username);
// check if user has accepted task
$accepted = Accepted::load($update->getAcceptedID());
// if($accepted == null) {
// header('Location: '.Url::error());
// exit();
// }
// get other updates
$updates = $accepted->getUpdates();
$filteredUpdates = array();
foreach ($updates as $u) {
    if ($u->getID() != $updateID) {