<?php require_once "config.php"; require_once WWW_DIR . "/lib/movie.php"; require_once WWW_DIR . "/lib/adminpage.php"; $page = new AdminPage(); if (isset($_GET['id'])) { $m = new Movie(); $m->delete($_GET['id']); } $referrer = $_SERVER['HTTP_REFERER']; header("Location: " . $referrer);
/** * Deletes the movie in database and their thumbnails associated. * Used in /movie/actions/executeRefreshMovieCollection * * @param Movie $movie_object */ public static function deleteMovie($movie_object, $user) { $movie_object->delete(); Util::deleteThumbnail($movie_object, $user); }