Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
unlockfile.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: unlockfile.php,v 1.10 2007/09/27 13:57:11 eric Exp $
11  * @package FDL
12  * @subpackage
13  */
14 /**
15  */
16 // ---------------------------------------------------------------
17 // $Id: unlockfile.php,v 1.10 2007/09/27 13:57:11 eric Exp $
18 // $Source: /home/cvsroot/anakeen/freedom/freedom/Action/Fdl/unlockfile.php,v $
19 // ---------------------------------------------------------------
20 include_once ("FDL/Class.Doc.php");
22 {
23 
24  $dbaccess = $action->dbaccess;
25  $docid = GetHttpVars("id", 0);
26  $rzone = GetHttpVars("rzone"); // special zone when finish edition
27  $rvid = GetHttpVars("rvid"); // special zone when finish edition
28  $auto = (GetHttpVars("auto", "N") == "Y"); // just auto unlock
29  $autoclose = (GetHttpVars("autoclose", "N") == "Y"); // close window after
31 
32  $err = $doc->UnLock($auto);
33  if ($err != "") $action->ExitError($err);
34 
35  if (!$auto) $action->AddLogMsg(sprintf(_("%s has been unlocked") , $doc->title));
36 
37  $action->AddActionDone("UNLOCKDOC", $doc->id);
38  // add events for folders
39  $fdlids = $doc->getParentFolderIds();
40  foreach ($fdlids as $fldid) {
41  $action->AddActionDone("MODFOLDERCONTAINT", $fldid);
42  }
43  if ($autoclose) {
44  header('Content-type: text/xml; charset=utf-8');
45  } else {
46  $opt = "";
47  if ($rzone != "") $opt = "&zone=$rzone";
48  if ($rvid != "") $opt = "&vid=$rvid";
49  redirect($action, "FDL", "FDL_CARD$opt&id=" . $doc->id, $action->GetParam("CORE_STANDURL"));
50  }
51 }
global $action
$docid
Definition: cleanFamily.php:13
unlockfile(Action &$action)
Definition: unlockfile.php:21
new_Doc($dbaccess, $id= '', $latest=false)
$dbaccess
Definition: checkVault.php:17
if($file) if($subject==""&&$file) if($subject=="") $err
← centre documentaire © anakeen