delete() public method

public delete ( $id )
Exemplo n.º 1
0
     httpResponse($polls->vote($params[2], (int) $postdata["choise"]));
     break;
 case validateRoute('POST', 'polls'):
     $forum = new Forum($db, $user);
     $polls = new Polls($db, $user, $forum);
     $polls->create($postdata);
     httpResponse();
     break;
 case validateRoute('PATCH', 'polls/\\d+'):
     $polls = new Polls($db, $user);
     $polls->update($params[1], $postdata);
     httpResponse();
     break;
 case validateRoute('DELETE', 'polls/\\d+'):
     $polls = new Polls($db, $user);
     $polls->delete($params[1], $postdata);
     httpResponse();
     break;
 case validateRoute('GET', 'torrents'):
     $torrent = new Torrent($db, $user);
     list($torrents, $total) = $torrent->search($_GET["categories"], $_GET['section'], $_GET["index"], $_GET["limit"], $_GET["sort"], $_GET["order"], $_GET["searchText"], $_GET["hideOld"], $_GET["p2p"], $_GET["extendedSearch"], $_GET["watchview"]);
     if ($_GET["page"]) {
         $user->updateLastTorrentViewAccess($_GET["page"]);
     }
     httpResponse($torrents, $total);
     break;
 case validateRoute('GET', 'torrents/\\d+'):
     $torrent = new Torrent($db);
     $myTorrent = $torrent->get($params[1]);
     httpResponse($myTorrent);
     break;