Пример #1
0
/**
 * This function dispatches the task at issue to the respective function.
 */
function messages_main($caveID, $caves)
{
    // initialize controller
    $controller = NULL;
    // get current task
    $task = Request::getVar('task', '');
    switch ($task) {
        default:
        case 'New':
            require_once 'modules/Messages/controller/New.php';
            $controller = new Messages_New_Controller();
            break;
    }
    return $controller === NULL ? '' : $controller->execute($caveID, $caves);
}
Пример #2
0
/**
 * This function dispatches the task at issue to the respective function.
 */
function messages_main($caveID, $caves)
{
    global $params;
    // initialize controller
    $controller = NULL;
    // get current task
    $task = $params->POST->task;
    switch ($task) {
        default:
        case 'New':
            require_once 'modules/Messages/controller/New.php';
            $controller = new Messages_New_Controller();
            break;
    }
    return $controller === NULL ? '' : $controller->execute($caveID, $caves);
}