예제 #1
0
function is_assigned_to($bug)
{
    try {
        if (empty($bug['group_ID']) && !empty($bug['user_ID'])) {
            $return = get_simple_user($bug['user_ID']);
            $return['assigned'] = $return['login'];
        } else {
            $return = get_simple_group($bug['group_ID']);
            $return['assigned'] = $return['name'];
        }
        return $return;
    } catch (Exception $e) {
        return false;
    }
}
예제 #2
0
<?php

if (!defined("_BASE_URL")) {
    die("Pirate reconnu !");
}
if (!empty($_SESSION['user_ID']) && !empty($_SESSION['team_ID'])) {
    if (!empty($_GET['group_ID']) && !empty($_GET['delete'])) {
        if ($_GET['delete'] == "wait") {
            require_once 'model/user/get-simple-group.php';
            $group = get_simple_group($_GET['group_ID']);
            include_once 'view/group/delete-group.php';
        } else {
            if ($_GET['delete'] == "ok") {
                require_once 'model/user/delete-group.php';
                $group = delete_group($_GET['group_ID']);
                if ($group) {
                    header('Location: ?module=group&notif=deleted');
                } else {
                    header('Location: ?module=group&notif=notdeleted');
                }
            } else {
                header('Location: ?module=group');
            }
        }
    } else {
        header('Location: ?module=group');
    }
} else {
    header('Location: ?module=auth');
}