Core  3.2
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  * @package FDL
5 */
6 /**
7  * Lock a document
8  *
9  * @author Anakeen
10  * @version $Id: lockfile.php,v 1.6 2006/04/28 14:33:39 eric Exp $
11  * @package FDL
12  * @subpackage
13  */
14 /**
15  */
16 
17 include_once ("FDL/Class.Doc.php");
18 function lockfile(Action & $action)
19 {
20 
21  $dbaccess = $action->dbaccess;
22  $docid = GetHttpVars("id", 0);
23 
25 
26  $err = $doc->lock();
27  if ($err != "") $action->ExitError($err);
28 
29  $action->AddActionDone("LOCKDOC", $doc->id);
30  $action->AddLogMsg(sprintf(_("%s has been locked") , $doc->title));
31  // add events for folders
32  $fdlids = $doc->getParentFolderIds();
33  foreach ($fdlids as $fldid) {
34  $action->AddActionDone("MODFOLDERCONTAINT", $fldid);
35  }
36 
37  redirect($action, "FDL", "FDL_CARD&id=" . $doc->id, $action->GetParam("CORE_STANDURL"));
38 }
global $action
lockfile(Action &$action)
Definition: lockfile.php:18
$docid
Definition: cleanFamily.php:13
new_Doc($dbaccess, $id= '', $latest=false)
$dbaccess
Definition: checkVault.php:17
if($file) if($subject==""&&$file) if($subject=="") $err
← centre documentaire © anakeen