}); Request::get('Ajax/subscribe/:cid/:tid/:level', function ($cid, $tid, $level) { $subscribe = new CODOF\Forum\Notification\Subscriber(); $subscribe->toTopic($cid, $tid, $level); }); Request::get('Ajax/mentions/validate', function () { $mentioner = new CODOF\Forum\Notification\Mention(); $_mentions = $_GET['mentions']; return $mentioner->getValid($_mentions); }); Request::get('Ajax/mentions/mentionable/:cid', function ($cid) { $mentioner = new CODOF\Forum\Notification\Mention(); return $mentioner->getNotMentionable($cid); }); Request::get('Ajax/mentions/:q/:cid/:tid', function ($q, $cid = 0, $tid = 0) { $mentioner = new CODOF\Forum\Notification\Mention(); return $mentioner->find($q, $cid, $tid); }); dispatch_get('Ajax/cron/run/:name', function ($name) { $user = CODOF\User\User::get(); if (Request::valid($_GET['token']) && $user->hasRoleId(ROLE_ADMIN)) { $cron = new \CODOF\Cron\Cron(); if (!$cron->run($name)) { echo 'Unable to run cron ' . $name . ' because another cron is already running'; } } //exit; }); //-------------PAGES-------------------------- dispatch_get('/page/:id/:url', function ($id, $url) { $pid = (int) $id; $user = \CODOF\User\User::get();