Ejemplo n.º 1
0
    $controller->create();
});
$app->delete('/inbox/:id', function ($id) {
    fAuthorization::requireLoggedIn();
    $controller = new MailController();
    $controller->delete($id);
});
$app->post('/msgs', function () {
    fAuthorization::requireLoggedIn();
    $controller = new MsgController();
    $controller->create();
});
$app->post('/search', function () {
    fAuthorization::requireLoggedIn();
    $controller = new SearchController();
    $controller->show();
});
$app->delete('/msgs/:id', function ($id) {
    fAuthorization::requireLoggedIn();
    $controller = new MsgController();
    $controller->delete($id);
});
$app->get('/tweets', function () {
    UserHelper::requireProfile();
    $controller = new TweetController();
    $controller->index();
});
$app->post('/tweets', function () {
    fAuthorization::requireLoggedIn();
    $controller = new TweetController();
    $controller->create();
Ejemplo n.º 2
0
function search_on_search_form(&$api)
{
    $api->breadcrumbs()->add_text(_('Find'));
    $controller = new SearchController($api);
    $controller->show((int) $_GET['forum_id'], $_GET['q']);
}