$arr = $suggestions->get($_GET["view"] ?: 'top', (int) $_GET["limit"] ?: 10);
httpResponse($arr);
break;
case validateRoute('POST', 'suggestions/\\d+/votes'):
$suggestions = new Suggestions($db, $user);
$arr = $suggestions->vote($params[1], $postdata["direction"]);
httpResponse($arr);
break;
case validateRoute('POST', 'suggestions'):
$forum = new Forum($db, $user);
$suggestions = new Suggestions($db, $user, $forum);
httpResponse($suggestions->create($postdata));
break;
case validateRoute('PATCH', 'suggestions/\\d+'):
$suggestions = new Suggestions($db, $user);
httpResponse($suggestions->update($params[1], $postdata));
break;
case validateRoute('GET', 'sweTvGuide'):
$week = (int) $_GET["week"];
$cacheId = 'swetvguide-' . $week;
if ($memcache && ($cached = $memcache->get($cacheId))) {
if ($week == 0) {
$user->updateLastTorrentViewAccess('last_tvbrowse');
}
httpResponse($cached);
} else {
$torrent = new Torrent($db, $user);
if ($week > 3) {
$week = 4;
}
$array = array();