Esempio n. 1
0
 function delete()
 {
     $peer = new FolderPeer();
     $result = $peer->find_by_id(Params::get("id"));
     self::delete_attributes($result);
     $peer->delete($result);
     if (is_html()) {
         Flash::ok("Cartella eliminata con successo.");
         return Redirect::success();
     } else {
         return Result::ok();
     }
 }
Esempio n. 2
0
 function delete()
 {
     $peer = new FolderPeer();
     $result = $peer->find_by_id(Params::get("id"));
     $path = $result["path"];
     $nome = $result["nome"];
     $full_path = $path . $nome . "/";
     $tipo = $result["tipo"];
     $tipo_tokens = explode("_", $tipo);
     $controller_name = $tipo_tokens[1];
     call($controller_name, "delete_by_path", array("path" => $full_path));
     $peer->delete($result);
     if (is_html()) {
         Flash::ok("Cartella eliminata con successo.");
         return Redirect::success();
     } else {
         return Result::ok();
     }
 }