$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+'): $forum = new Forum($db, $user); $suggestions = new Suggestions($db, $user, $forum); httpResponse($suggestions->update($params[1], $postdata)); break; case validateRoute('DELETE', 'suggestions/\\d+'): $suggestions = new Suggestions($db, $user); httpResponse($suggestions->delete($params[1])); break; case validateRoute('GET', 'sweTvGuide'): $week = (int) $_GET["week"]; $cacheId = 'swetvguide-' . $week; if ($memcached && ($cached = $memcached->get($cacheId))) { if ($week == 0) { $user->updateLastTorrentViewAccess('last_tvbrowse'); } httpResponse($cached); } else { $torrent = new Torrent($db, $user); if ($week > 3) { $week = 4; } $array = array();