delete() public method

public delete ( $id, $reason = '' )
Beispiel #1
0
     $subtitles = new Subtitles($db, $user);
     httpResponse($subtitles->fetch($_GET["torrentid"]));
     break;
 case validateRoute('POST', 'subtitles'):
     $torrent = new Torrent($db, $user);
     $log = new Logs($db);
     $mailbox = new Mailbox($db, $user);
     $subtitles = new Subtitles($db, $user, $log, $torrent, $mailbox);
     httpResponse($subtitles->upload($_FILES["file"], $_POST));
     break;
 case validateRoute('DELETE', 'subtitles/\\d+'):
     $log = new Logs($db);
     $torrent = new Torrent($db, $user);
     $mailbox = new Mailbox($db, $user);
     $subtitles = new Subtitles($db, $user, $log, $torrent, $mailbox);
     httpResponse($subtitles->delete((int) $params[1], $_GET["reason"]));
     break;
 case validateRoute('GET', 'donations'):
     $donations = new Donations($db, $user);
     list($result, $totalCount) = $donations->query(array("limit" => $_GET["limit"], "index" => $_GET["index"]));
     httpResponse($result, $totalCount);
     break;
 case validateRoute('POST', 'donations'):
     $donate = new Donations($db, $user);
     httpResponse($donate->create($postdata));
     break;
 case validateRoute('PATCH', 'donations/\\d+'):
     $donate = new Donations($db, $user);
     httpResponse($donate->update((int) $params[1], $postdata));
     break;
 case validateRoute('DELETE', 'donations/\\d+'):