public function delete() { $url = Registry::getUrl(); $id = $_REQUEST["id"] ? $_REQUEST["id"] : $url->vars[0]; $entrada = new Entrada($id); if ($entrada->id) { if ($entrada->delete()) { Registry::addMessage("Entrada eliminada satisfactoriamente", "success"); //Log Log::add(LOG_DELETE_ENTRADA, $entrada); } } Url::redirect(Url::site("entradas")); }