Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
moddfld.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  * Change default folder for family
9  *
10  * @author Anakeen 2000
11  * @version $Id: moddfld.php,v 1.8 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 include_once ("FDL/Class.Doc.php");
20 include_once ("FDL/Class.Dir.php");
21 include_once ("FDL/Class.DocAttr.php");
22 include_once ("FDL/freedom_util.php");
23 // -----------------------------------
24 function moddfld(&$action)
25 {
26  // -----------------------------------
27 
28  // Get all the params
29  $docid = GetHttpVars("docid");
30  $current = (GetHttpVars("current", "N") == "Y");
31  $newfolder = (GetHttpVars("autofolder", "N") == "Y");
32  $fldid = GetHttpVars("dfldid");
33 
34  if ($docid == 0) $action->exitError(_("the document is not referenced: cannot apply defaut folder"));
35 
36  $dbaccess = $action->GetParam("FREEDOM_DB");
37  // initialise object
39  // create folder if auto
40  if ($newfolder) {
41 
43  }
44 
45  if ($current) $doc->cfldid = $fldid;
46  else $doc->dfldid = $fldid; // new default folder
47  // test object permission before modify values (no access control on values yet)
48  $doc->lock(true); // enabled autolock
49  $err = $doc->canEdit();
50  if ($err != "") $action->ExitError($err);
51 
52  $doc->Modify();
53 
54  $doc->unlock(true); // disabled autolock
55 
56  redirect($action, "FDL", "FDL_CARD&id=$docid", $action->GetParam("CORE_STANDURL"));
57 }
58 ?>
← centre documentaire © anakeen - published under CC License - Dynacase