Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
onefam_ext_modpref.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  * validate user or master choosen families
9  *
10  * @author Anakeen 2000
11  * @version $Id: onefam_modpref.php,v 1.8 2006/10/05 09:22:38 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 
21 function onefam_ext_modpref(&$action, $idsattr = "ONEFAM_IDS")
22 {
23  $tidsfam = GetHttpVars("idsfam", array()); // preferenced families
24  $openfam = GetHttpVars("preffirstfam"); //
25  $dbaccess = $action->GetParam("FREEDOM_DB");
26 
27  $idsfam = $action->GetParam($idsattr);
28 
29  $idsfam = json_decode($tidsfam);
30  $idsfam = implode(",", $idsfam);
31 
32  $action->addLogMsg('TEST');
33 
34  if ($idsattr == "ONEFAM_IDS") {
35  //$action->parent->param->Set($idsattr,$idsfam,PARAM_USER.$action->user->id,$action->parent->id);
36  $action->setParamU($idsattr, $idsfam);
37  //$action->parent->param->Set("ONEFAM_FAMOPEN",$openfam,PARAM_USER.$action->user->id,$action->parent->id);
38 
39  } else {
40  $action->parent->param->Set($idsattr, $idsfam, PARAM_APP, $action->parent->id);
41  //$action->parent->param->Set("ONEFAM_FAMOPEN",$openfam,PARAM_APP,$action->parent->id);
42 
43  }
44 
45  $out = array(
46  'ids' => explode(",", $idsfam)
47  );
48 
49  $action->lay->noparse = true; // no need to parse after - increase performances
50  $action->lay->template = json_encode($out);
51 }
53 {
54  onefam_ext_modpref($action, "ONEFAM_MIDS");
55 }
56 ?>
← centre documentaire © anakeen - published under CC License - Dynacase