Platform
3.1
PHP API documentation
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
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
* @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
5
* @package FDL
6
*/
7
/**
8
* Generated Header (not documented yet)
9
*
10
* @author Anakeen 2000
11
* @version $Id: freedom_del.php,v 1.10 2005/06/28 08:37:46 eric Exp $
12
* @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
13
* @package FDL
14
* @subpackage GED
15
*/
16
/**
17
*/
18
// ---------------------------------------------------------------
19
// $Id: freedom_del.php,v 1.10 2005/06/28 08:37:46 eric Exp $
20
// $Source: /home/cvsroot/anakeen/freedom/freedom/Action/Freedom/freedom_del.php,v $
21
// ---------------------------------------------------------------
22
include_once (
"FDL/Class.Doc.php"
);
23
include_once (
"FDL/Class.DocAttr.php"
);
24
include_once (
"FDL/freedom_util.php"
);
25
// -----------------------------------
26
function
freedom_del
(&
$action
)
27
{
28
// -----------------------------------
29
// Get all the params
30
$docid
=
GetHttpVars
(
"id"
);
31
$dbaccess
=
$action
->GetParam(
"FREEDOM_DB"
);
32
33
if
(
$docid
==
""
)
return
;
34
35
$doc
=
new_Doc
(
$dbaccess
,
$docid
);
36
// must unlocked before
37
$err
=
$doc
->CanLockFile();
38
if
(
$err
!=
""
)
$action
->ExitError(
$err
);
39
// ------------------------------
40
// delete POSGRES card
41
$err
=
$doc
->Delete();
42
if
(
$err
!=
""
)
$action
->ExitError(
$err
);
43
44
$action
->AddLogMsg(sprintf(_(
"%s has been deleted"
) ,
$doc
->title));
45
46
redirect(
$action
,
"FDL"
,
"FDL_CARD&id=$docid"
);
47
}
48
?>
← centre documentaire
© anakeen
- published under
CC License
-
Dynacase