Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
lockfile.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  * Lock a document
9  *
10  * @author Anakeen 2000
11  * @version $Id: lockfile.php,v 1.6 2006/04/28 14:33:39 eric Exp $
12  * @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
13  * @package FDL
14  * @subpackage
15  */
16 /**
17  */
18 
19 include_once ("FDL/Class.Doc.php");
20 function lockfile(&$action)
21 {
22 
23  $dbaccess = $action->GetParam("FREEDOM_DB");
24  $docid = GetHttpVars("id", 0);
25 
26  $action->lay->Set("docid", $docid);
27 
29 
30  $err = $doc->lock();
31  if ($err != "") $action->ExitError($err);
32 
33  $action->AddActionDone("LOCKDOC", $doc->id);
34  $action->AddLogMsg(sprintf(_("%s has been locked") , $doc->title));
35  // add events for folders
36  $fdlids = $doc->getParentFolderIds();
37  foreach ($fdlids as $fldid) {
38  $action->AddActionDone("MODFOLDERCONTAINT", $fldid);
39  }
40 
41  redirect($action, "FDL", "FDL_CARD&id=" . $doc->id, $action->GetParam("CORE_STANDURL"));
42 }
43 ?>
← centre documentaire © anakeen - published under CC License - Dynacase