Core
3.2
PHP API documentation
Main Page
Related Pages
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Pages
restoredoc.php
Go to the documentation of this file.
1
<?php
2
/*
3
* @author Anakeen
4
* @package FDL
5
*/
6
/**
7
* UnTrash document
8
*
9
* @author Anakeen
10
* @version $Id: restoredoc.php,v 1.1 2007/10/16 14:07:14 eric Exp $
11
* @package FDL
12
* @subpackage
13
*/
14
/**
15
*/
16
17
include_once (
"FDL/Lib.Dir.php"
);
18
/**
19
* Get a doc from the trash
20
* @param Action &$action current action
21
* @global id int Http var : document id to restore
22
* @global reload string Http var : [Y|N] if Y not xml but redirect to fdl_card
23
* @global containt string Http var : if 'yes' restore also folder items
24
*/
25
function
restoredoc
(
Action
&
$action
)
26
{
27
28
$docid
= GetHttpVars(
"id"
);
29
$dbaccess
= $action->dbaccess;
30
31
$doc
= new_doc(
$dbaccess
,
$docid
);
32
33
$err
=
''
;
34
if
(
$doc
->isAffected()) {
35
if
(!
$doc
->isAlive()) {
36
$err
=
$doc
->undelete();
37
}
38
}
else
$err
= sprintf(_(
"document [%s] not found"
));
39
40
if
(
$err
) $action->
addWarningMsg
(
$err
);
41
42
redirect($action,
"FDL"
,
"FDL_CARD&sole=Y&refreshfld=Y&latest=Y&id=$docid"
);
43
}
Action\addWarningMsg
addWarningMsg($msg)
Definition:
Class.Action.php:372
$action
global $action
Definition:
accountRefreshGroup.php:16
Action
Definition:
Class.Action.php:24
$docid
$docid
Definition:
cleanFamily.php:13
$dbaccess
$dbaccess
Definition:
checkVault.php:17
$err
if($file) if($subject==""&&$file) if($subject=="") $err
Definition:
fdl_sendmail.php:78
restoredoc
restoredoc(Action &$action)
Definition:
restoredoc.php:25
$doc
$doc
Definition:
SetDocVaultIndex.php:39
← centre documentaire
© anakeen