Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
freedom_del.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @package FDL
5 */
6 /**
7  * Generated Header (not documented yet)
8  *
9  * @author Anakeen
10  * @version $Id: freedom_del.php,v 1.10 2005/06/28 08:37:46 eric Exp $
11  * @package FDL
12  * @subpackage GED
13  */
14 /**
15  */
16 // ---------------------------------------------------------------
17 // $Id: freedom_del.php,v 1.10 2005/06/28 08:37:46 eric Exp $
18 // $Source: /home/cvsroot/anakeen/freedom/freedom/Action/Freedom/freedom_del.php,v $
19 // ---------------------------------------------------------------
20 include_once ("FDL/Class.Doc.php");
21 include_once ("FDL/Class.DocAttr.php");
22 include_once ("FDL/freedom_util.php");
23 // -----------------------------------
25 {
26  // -----------------------------------
27  // Get all the params
28  $docid = GetHttpVars("id");
29  $dbaccess = $action->dbaccess;
30 
31  if ($docid == "") return;
32 
34  // must unlocked before
35  $err = $doc->CanLockFile();
36  if ($err != "") $action->ExitError($err);
37  // ------------------------------
38  // delete POSGRES card
39  $err = $doc->Delete();
40  if ($err != "") $action->ExitError($err);
41 
42  $action->AddLogMsg(sprintf(_("%s has been deleted") , $doc->title));
43 
44  redirect($action, "FDL", "FDL_CARD&id=$docid");
45 }
global $action
$docid
Definition: cleanFamily.php:13
new_Doc($dbaccess, $id= '', $latest=false)
freedom_del(Action &$action)
Definition: freedom_del.php:24
$dbaccess
Definition: checkVault.php:17
if($file) if($subject==""&&$file) if($subject=="") $err
← centre documentaire © anakeen