Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
document.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  * Document Api access
9  *
10  * @author Anakeen 2009
11  * @version $Id: $
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 ("DATA/Class.Collection.php");
20 /**
21  * Retrieve and set documents
22  * @param Action &$action current action
23  * @global id Http var : document identificator
24  */
25 function document(Action & $action)
26 {
27  $mb1 = microtime(true);
28  $id = getHttpVars("id");
29  $method = strtolower(getHttpVars("method"));
30  if ($err) {
31  $returntype = "json";
32  $out->error = $err;
33  } else {
34  $start = microtime(true);
35  documentApplyMethod($action, $id, $method, $returntype, $out);
36  }
37  if ($returntype != "json") $action->lay->template = $out;
38  else {
39  if ($action->debug) {
40  if (is_array($out)) $out["debuginfo"] = getPerfoInfo(sprintf("%.03fs", microtime(true) - $mb1));
41  else if (is_object($out)) $out->debuginfo = getPerfoInfo(sprintf("%.03fs", microtime(true) - $mb1));
42  }
43  addLogInData($action, $out);
44  $action->lay->template = json_encode($out);
45  }
46  $action->lay->noparse = true; // no need to parse after - increase performances
47 
48 }
49 include_once ("WHAT/wdebug.php");
50 
51 function getPerfoInfo($time = '')
52 {
53  global $SQLDELAY, $SQLDEBUG;
54  global $TSQLDELAY, $DEBUGINFO;
55 
56  $trace["all"] = sprintf("%.03fs", microtime(true) - $DEBUGINFO["mbinit"]);
57  $trace["queries"] = sprintf("%.03fs #%d", $SQLDELAY, count($TSQLDELAY));
58  if ($time) $trace["action"] = $time;
59  $trace["initauthent"] = sprintf("%.03fs", $DEBUGINFO["mbaction"] - $DEBUGINFO["mbinit"]);
60  $trace["memory"] = sprintf("%dkb", round(memory_get_usage() / 1024));
61  return $trace;
62 }
63 /**
64  * Display info before download
65  * @global id Http var : document for file to edit (SIMPLEFILE family)
66  */
67 function documentApplyMethod(Action & $action, $id, $method, &$returntype, &$out, &$doc = null)
68 {
69  $returntype = "json";
70  $doc = null;
71  $out = false;
72  switch ($method) {
73  case 'getselection':
74  $config = getHttpVars("config");
75  if (is_object($config)) {
76  include_once ("DATA/Class.DocumentSelection.php");
77  $sel = new Fdl_DocumentSelection($config);
78  $idssel = $sel->getIdentificators();
79  $out->content = array();
80  foreach ($idssel as $did) { // set mimimum info to use it with foreach request
81  $out->content[]["properties"]["id"] = $did;
82  }
83  } else {
84  $out->error = sprintf(_("getSelection: no configuration set"));
85  }
86  break;
87 
88  case 'getcontent':
89  if (!$id) {
90  $err = sprintf(_("empty reference"));
91  break;
92  }
93  $doc = new Fdl_Collection($id);
94  if (!$doc->error) {
95  $doc->setContentCompleteProperties($action->getArgument("completeProperties", "false") == "true");
96  $doc->setContentOnlyValue($action->getArgument("onlyValues", "true") == "true");
97  $doc->setContentOrderBy($action->getArgument("orderBy"));
98  $doc->setContentSlice($action->getArgument("slice", 100));
99  $doc->setContentStart($action->getArgument("start", 0));
100  $doc->setContentKey($action->getArgument("key"));
101  $doc->setContentKeyMode($action->getArgument("mode", "word"));
102  $doc->setContentRecursiveLevel($action->getArgument("recursiveLevel", 0));
103  $doc->setContentSearchProperty($action->getArgument("searchProperty", "svalues"));
104  $filter = $action->getArgument("filter");
105  if ($filter) $filter = json_decode($filter);
106  if ($filter == "undefined") $filter = "";
107  $doc->setContentFilter($filter);
108  $doc->setContentVerifyHasChild($action->getArgument("verifyhaschild") == "true");
109  $out = $doc->getContent();
110  } else $out->error = $doc->error;
111  break;
112 
113  case 'getauthorizedfamilies':
114  $doc = new Fdl_Collection($id);
115  if (!$doc->error) {
116  $out->authorizedFamilies = $doc->getAuthorizedFamilies();
117  } else $out->error = $doc->error;
118  break;
119 
120  case 'getsubfamilies':
121  $famid = getHttpVars("famid");
122  if (!$famid) $out->error = _("data:getsubfamilies no family parameter");
123  else {
124  $doc = new Fdl_Collection();
125  if (!$doc->error) {
126  $cc = (getHttpVars("controlCreation", "false") == "true");
127  $out = $doc->getSubFamilies($famid, $cc);
128  } else $out->error = $doc->error;
129  }
130  break;
131 
132  case 'search':
133  $onlyValues = getHttpVars("onlyValues", "true") == "true";
134  $doc = new Fdl_Collection();
135  if (!$doc->error) {
136  $key = getHttpVars("key");
137  $famid = getHttpVars("family", getHttpVars("famid", 0));
138  $start = getHttpVars("start", 0);
139  $slice = getHttpVars("slice", 100);
140  $mode = getHttpVars("mode", "word");
141  $orderby = getHttpVars("orderBy");
142  $whl = (getHttpVars("withHighlight", "false") == "true");
143  $filter = getHttpVars("filter");
144  $verifyhaschild = getHttpVars("verifyhaschild");
145  if ($filter) $filter = json_decode($filter);
146  if ($filter == "undefined") $filter = "";
147  $searchproperty = getHttpVars("searchProperty", "svalues");
148  $out = $doc->simpleSearch($key, $mode, $famid, $filter, $start, $slice, $orderby, $onlyValues, $searchproperty, $whl, $verifyhaschild);
149  } else $out->error = $doc->error;
150  break;
151 
152  case 'retrieveproposal':
153  $key = getHttpVars("key");
154  $aid = getHttpVars("attributeId");
155  $famid = getHttpVars("relationFamilyId");
156  if (((!$id) || ($id == "null") || (!$aid) || ($aid == "null")) && ($famid)) {
157  include_once ("DATA/Lib.Document.php");
158  $out->proposal = searchByTitle($famid, $key);
159  } else {
160 
161  $doc = new Fdl_Document($id);
162  if (!$doc->error) {
163  $oa = $doc->getAttribute($aid);
164  if (!$oa) {
165  $out->error = sprintf(_("attribute unknow %s") , $aid);
166  } else {
167  $out->error = null;
168  $out->proposal = $doc->getProposalDocuments($oa->id, $key);
169  }
170  } else $out->error = $doc->error;
171  }
172  break;
173 
174  case 'insertdocument':
175  $doc = new Fdl_Collection($id);
176  if (!$doc->error) {
177  $idtoadd = getHttpVars("idtoadd");
178  if (!$idtoadd) $out->error = _("nothing to add");
179  else $out = $doc->insertDocument($idtoadd);
180  } else $out->error = $doc->error;
181  break;
182 
183  case 'unlinkdocument':
184  $doc = new Fdl_Collection($id);
185  if (!$doc->error) {
186  $idtoadd = getHttpVars("idtounlink");
187  if (!$idtoadd) $out->error = _("nothing to unlink");
188  else $out = $doc->unlinkDocument($idtoadd);
189  } else $out->error = $doc->error;
190  break;
191 
192  case 'moveto':
193  $doc = new Fdl_Document($id);
194  if (!$doc->error) {
195  $moveto = getHttpVars("folderId");
196  $movefrom = getHttpVars("fromFolderId");
197  $doc->moveto($moveto);
198  $out = $doc->getDocument($onlyValues);
199  } else $out->error = $doc->error;
200  break;
201 
202  case 'unlinkdocuments':
203  $doc = new Fdl_Collection($id);
204  if (!$doc->error) {
205  $selection = getHttpVars("selection");
206  if ($selection) {
207  $selection = json_decode($selection);
208  $out = $doc->unlinkDocuments($selection);
209  } else $out->error = _("nothing to unlink");
210  } else $out->error = $doc->error;
211  break;
212 
213  case 'unlinkalldocuments':
214  $doc = new Fdl_Collection($id);
215  if (!$doc->error) {
216  $out = $doc->unlinkAllDocuments();
217  } else $out->error = $doc->error;
218  break;
219 
220  case 'movedocuments':
221  $doc = new Fdl_Collection($id);
222  if (!$doc->error) {
223  $selection = getHttpVars("selection");
224  $targetId = getHttpVars("targetIdentificator");
225  if ($selection) {
226  $selection = json_decode($selection);
227  $out = $doc->moveDocuments($selection, $targetId);
228  } else $out->error = _("nothing to unlink");
229  } else $out->error = $doc->error;
230  break;
231 
232  case 'insertdocuments':
233  $doc = new Fdl_Collection($id);
234  if (!$doc->error) {
235  $selection = getHttpVars("selection");
236  if ($selection) {
237  $selection = json_decode($selection);
238  $out = $doc->insertDocuments($selection);
239  } else $out->error = _("nothing to insert");
240  } else $out->error = $doc->error;
241  break;
242 
243  case 'history':
244  $doc = new Fdl_Document($id);
245  if (!$doc->error) {
246  $out->items = $doc->getHistory();
247  $out->revisions = $doc->getRevisions();
248  } else $out->error = $doc->error;
249  break;
250 
251  case 'create':
252  $doc = new Fdl_Document();
253  $temporary = (getHttpVars("temporary", "false") == "true");
254  $doc->createDocument($id, $temporary); // not set in database
255  $out = $doc->getDocument($onlyValues);
256  break;
257 
258  case 'clonedocument':
259  case 'clone':
260  $temporary = (getHttpVars("temporary", "false") == "true");
261  $linkfld = (getHttpVars("linkFolder", "true") == "true");
262  $copyfiles = (getHttpVars("cloneFiles", "false") == "true");
263  $title = getHttpVars("title");
264  if (!$id) $out->error = _("no identificator set");
265  else {
266  $doc = new Fdl_Document($id);
267  if (!$doc->error) {
268  $clone = $doc->cloneDocument($temporary, $linkfld, $copyfiles, $title);
269  if ($clone) $out = $clone->getDocument($onlyValues);
270  else $out->error = $doc->error;
271  $doc = $clone;
272  } else $out->error = $doc->error;
273  }
274  break;
275 
276  case 'send':
277  case 'senddocument':
278  if (!$id) {
279  $out->error = _("no identificator set");
280  } else {
281  $to = getHttpVars("to");
282  $cc = getHttpVars("cc");
283  $bcc = getHttpVars("bcc");
284  $subject = getHttpVars("subject");
285  $comment = getHttpVars("comment");
286  $savecopy = getHttpVars("sendercopy");
287  $doc = new Fdl_Document($id);
288  $doc->send($to, $cc, $bcc, $subject, $comment, $savecopy);
289  }
290  break;
291 
292  case 'save':
293  $autounlock = (getHttpVars("autounlock") == "true");
294  if ($id) {
295  $doc = new Fdl_Document($id);
296  $doc->setValueFromHttpVars();
297  $doc->setLogicalIdentificator();
298  $doc->save();
299  } else {
300  $doc = new Fdl_Document();
301  $famid = getHttpVars("family", getHttpVars("familyid"));
302  $temporary = (getHttpVars("temporary", "false") == "true");
303  $doc->createDocument($famid, $temporary);
304  $doc->setValueFromHttpVars();
305  $doc->setLogicalIdentificator();
306  $doc->create(); // really set in database
307 
308  }
309  if (!$doc->error) {
310  if ($autounlock) $doc->unlock(true);
311  $out = $doc->getDocument($onlyValues);
312  } else $out->error = $doc->error;
313  break;
314 
315  case 'saveform':
316  $autounlock = (getHttpVars("autounlock") == "true");
317  $doc = new Fdl_Document($id);
318  if (!$doc->error) {
319  $doc->setValueFromHttpVars();
320  $doc->setFileValueFromHttpVars();
321  $doc->setLogicalIdentificator();
322  $callback = getHttpVars("callid");
323  $doc->save();
324  if ((!$doc->error) && $autounlock) $doc->unlock(true);
325  $data = $doc->getDocument($onlyValues);
326  $out = sprintf("<html><script>var data=%s;</script><body onload=\"window.parent.Fdl._completeSave('%s',data)\"></body></html>", json_encode($data) , $callback);
327 
328  $returntype = "html";
329  } else $out->error = $doc->error;
330  break;
331 
332  case 'changestate':
333  $newstate = getHttpVars("state");
334  $doc = new Fdl_Document($id);
335  if (!$doc->error) $doc->changeState($newstate);
336  $out = $doc->getDocument($onlyValues);
337  break;
338 
339  case 'addusertag':
340  $tag = getHttpVars("tag");
341  $comment = getHttpVars("comment");
342  $doc = new Fdl_Document($id);
343  if (!$doc->error) $doc->addUserTag($tag, $comment);
344  $out = $doc->getDocument($onlyValues, true, false, true);
345  break;
346 
347  case 'deleteusertag':
348  $tag = getHttpVars("tag");
349  $doc = new Fdl_Document($id);
350  if (!$doc->error) $doc->deleteUserTag($tag);
351  $out = $doc->getDocument($onlyValues, true, false, true);
352  break;
353 
354  case 'lock':
355  $auto = (getHttpVars("autolock") == "true");
356  $doc = new Fdl_Document($id);
357  if (!$doc->error) $doc->lock($auto);
358  $out = $doc->getDocument($onlyValues);
359  break;
360 
361  case 'unlock':
362  $auto = (getHttpVars("autolock") == "true");
363  $doc = new Fdl_Document($id);
364  if (!$doc->error) $doc->unlock($auto);
365  $out = $doc->getDocument($onlyValues);
366  break;
367 
368  case 'allocate':
369  $uid = getHttpVars("userSystemId");
370  $duid = getHttpVars("userId");
371  if ($duid) {
372  $du = new Fdl_Document($duid);
373  $uid = $du->getValue("us_whatid");
374  }
375  $comment = getHttpVars("comment");
376  $revision = (getHttpVars("revision") == "true");
377  $autolock = (getHttpVars("lock") == "true");
378  $doc = new Fdl_Document($id);
379  if (!$doc->error) $doc->allocate($uid, $comment, $revision, $autolock);
380  $out = $doc->getDocument($onlyValues);
381  break;
382 
383  case 'unallocate':
384  $comment = getHttpVars("comment");
385  $revision = (getHttpVars("revision") == "true");
386  $doc = new Fdl_Document($id);
387  if (!$doc->error) $doc->unallocate($comment, $revision);
388  $out = $doc->getDocument($onlyValues);
389  break;
390 
391  case 'addrevision':
392  $comment = (getHttpVars("comment"));
393  $version = (getHttpVars("version"));
394  $volatile = (getHttpVars("volatileVersion", "false") == "true");
395  $doc = new Fdl_Document($id);
396  if (!$doc->error) {
397  $doc->addRevision($comment, $version);
398  if ((!$doc->error) && $volatile && $version) {
399  $doc->setVersion(' ', false);
400  $doc->save();
401  }
402  }
403  $out = $doc->getDocument($onlyValues);
404  break;
405 
406  case 'delete':
407  $really = (getHttpVars("really") == "true");
408  $doc = new Fdl_Document($id);
409  if (!$doc->error) $doc->delete($really);
410  $out = $doc->getDocument($onlyValues);
411  break;
412 
413  case 'restore':
414  $doc = new Fdl_Document($id);
415  if (!$doc->error) $doc->restore();
416  $out = $doc->getDocument($onlyValues);
417  break;
418 
419  case 'davurl':
420  include_once ("DATA/Lib.Document.php");
421  $vid = getHttpVars("vid");
422  $doc = new Fdl_Document($id);
423  $out->url = getDavUrl($id, $vid);
424  break;
425 
426  case 'haswaitingfiles':
427  include_once ("DATA/Lib.Document.php");
428  $doc = new Fdl_Document($id);
429  if (!$doc->error) {
430  $out->haswaitingfiles = $doc->hasWaitingFiles();
431  $out->error = null;
432  } else $out->error = $doc->error;
433  break;
434 
435  case 'getfollowingstates':
436  include_once ("DATA/Lib.Document.php");
437  $doc = new Fdl_Document($id);
438  if (!$doc->error) {
439  $out->followingStates = $doc->getFollowingStates();
440  $out->error = null;
441  } else $out->error = $doc->error;
442  break;
443 
444  case 'getusertags':
445  include_once ("DATA/Lib.Document.php");
446  $doc = new Fdl_Document($id);
447  if (!$doc->error) {
448  $out->userTags = $doc->getUserTags();
449  $out->error = null;
450  } else $out->error = $doc->error;
451  break;
452 
453  case 'getattachedtimers':
454  include_once ("DATA/Lib.Document.php");
455  $doc = new Fdl_Document($id);
456  if (!$doc->error) {
457  $out->attachedTimers = $doc->getAttachedTimers();
458  $out->error = null;
459  } else $out->error = $doc->error;
460  break;
461 
462  case 'addattribute':
463  case 'modifyattribute':
464  case 'removeattribute':
465  include_once ("DATA/Class.Family.php");
466  $doc = new Fdl_Family($id);
467  if (!$doc->error) {
468  $aid = getHttpVars("attributeId");
469  $type = getHttpVars("type", null);
470  $parent = getHttpVars("parent", null);
471  $visibility = getHttpVars("visibility", null);
472  $label = getHttpVars("label", null);
473  $order = getHttpVars("order", null);
474  $inTitle = (getHttpVars("inTitle") == "true");
475  $inAbstract = (getHttpVars("inAbstract") == "true");
476  $needed = (getHttpVars("needed") == "true");
477  $link = getHttpVars("link", null);
478  $elink = getHttpVars("elink", null);
479  $constraint = getHttpVars("constraint", null);
480  $options = getHttpVars("options", null);
481  if ($options) $options = json_decode($options);
482 
483  if ($method == "addattribute") {
484  $doc->addAttribute($aid, $label, $order, $type, $parent, $visibility, $inTitle, $inAbstract, $needed, $link, $elink, $phpfile, $phpfunc, $constraint, $options);
485  } elseif ($method == "removeattribute") {
486  $doc->removeAttribute($aid);
487  } else {
488  $doc->modifyAttribute($aid, $label, $order, $type, $parent, $visibility, $inTitle, $inAbstract, $needed, $link, $elink, $phpfile, $phpfunc, $constraint, $options);
489  }
490  $out = $doc->getDocument($onlyValues);
491  } else $out->error = $doc->error;
492  break;
493 
494  case 'addtransition':
495  case 'removetransition':
496  include_once ("DATA/Class.Workflow.php");
497  $doc = new Fdl_Workflow($id);
498  if (!$doc->error) {
499  $start = getHttpVars("start");
500  $finish = getHttpVars("finish");
501  $transitiontype = getHttpVars("transitionType");
502  if ($method == "addtransition") $doc->addTransition($start, $finish, $transitiontype);
503  else $doc->removeTransition($start, $finish);
504  $out = $doc->getDocument($onlyValues);
505  } else $out->error = $doc->error;
506  break;
507 
508  case 'addstate':
509  case 'modifystate':
510  case 'removestate':
511  include_once ("DATA/Class.Workflow.php");
512  $doc = new Fdl_Workflow($id);
513  if (!$doc->error) {
514  $key = getHttpVars("key");
515  $label = getHttpVars("label");
516  $activity = getHttpVars("activity");
517 
518  if ($method == "addstate") $doc->addState($key, $label, $activity);
519  elseif ($method == "removestate") $doc->removeState($key);
520  else $doc->modifyState($key, $label, $activity);
521  $out = $doc->getDocument($onlyValues);
522  } else $out->error = $doc->error;
523  break;
524 
525  case 'addtransitiontype':
526  case 'removetransitiontype':
527  case 'modifytransitiontype':
528  include_once ("DATA/Class.Workflow.php");
529  $doc = new Fdl_Workflow($id);
530  if (!$doc->error) {
531  $key = getHttpVars("key");
532  $label = getHttpVars("label", null);
533  $preMethod = getHttpVars("preMathod", null);
534  $postMethod = getHttpVars("postMathod", null);
535  $noComment = getHttpVars("noComment", null);
536  $ask = getHttpVars("ask", null);
537  if ($ask) $ask = json_decode($ask);
538  if ($method == "addtransitiontype") $doc->addTransitiontype($key, $label, $ask, $preMethod, $postmethod, $noComment);
539  elseif ($method == "modifytransitiontype") $doc->modifyTransitiontype($key, $label, $ask, $preMethod, $postmethod, $noComment);
540  else $doc->removeTransitiontype($key);
541  $out = $doc->getDocument($onlyValues);
542  } else $out->error = $doc->error;
543  break;
544 
545  case 'getsearchcriteria':
546  include_once ("FDL/Class.DocSearch.php");
547  $s = new DocSearch();
548  $operators = $s->top;
549  $out->error = '';
550  $out->operators = array();
551  $alltype = array(
552  'integer',
553  'text',
554  'longtext',
555  'htmltext',
556  'docid',
557  'double',
558  "ifile",
559  "array",
560  "file",
561  "image",
562  "enum",
563  "color",
564  "date",
565  "time",
566  "timestamp",
567  "money"
568  );
569  foreach ($operators as $k => $v) {
570  if (!is_array($v["type"])) $v["type"] = $alltype;
571  foreach ($v["type"] as $type) {
572  $label = $v["label"] ? _($v["label"]) : '';
573  $dynlabel = $v["dynlabel"] ? _($v["dynlabel"]) : '';
574  if ($v["slabel"]) {
575  foreach ($v["slabel"] as $kl => $vl) {
576  if ($kl == $type) $label = _($vl);
577  }
578  }
579  if ($v["sdynlabel"]) {
580  foreach ($v["sdynlabel"] as $kl => $vl) {
581  if ($kl == $type) $dynlabel = _($vl);
582  }
583  }
584  $out->operators[$type][] = array(
585  "operator" => $k,
586  "operand" => $v["operand"],
587  "label" => $label,
588  "tplLabel" => $dynlabel
589  );
590  }
591  }
592 
593  break;
594 
595  case 'reload':
596  case '':
597  if (!$id) $out->error = _("no identificator");
598  else {
599  $config->onlyValues = getHttpVars("onlyValues", "true") == "true";
600  $config->latest = (getHttpVars("latest", "true") == "true");
601  $winfo = (getHttpVars("needWorkflow", "false") == "true");
602  $config->propertiesInformation = (getHttpVars("propertiesInformation", "false") == "true");
603  $config->completeProperties = getHttpVars("completeProperties", "true") == "true";
604  $withContent = getHttpVars("contentStore", "false") == "true";
605  $config->getUserTags = getHttpVars("getUserTags", "false") == "true";
606  if ($withContent) $doc = new Fdl_Collection($id, $config);
607  elseif ($winfo) {
608  include_once ("DATA/Class.Workflow.php");
609  $doc = new Fdl_Workflow($id, $config);
610  } else $doc = new Fdl_Document($id, $config);
611  $out = $doc->getDocument($config->onlyValues, $config->completeProperties, $config->propertiesInformation, $config->getUserTags);
612  if ($withContent) {
613  if ($doc->isCollection()) {
614  $configContent = getHttpVars("contentConfig");
615  if ($configContent) {
616  $configContent = json_decode($configContent);
617 
618  $doc->setContentCompleteProperties($configContent->completeProperties === true);
619  $doc->setContentOnlyValue($configContent->onlyValues !== false);
620  $doc->setContentOrderBy($configContent->orderBy);
621  $doc->setContentSlice(($configContent->slice) ? $configContent->slice : 100);
622  $doc->setContentStart($configContent->start);
623  $doc->setContentKey($configContent->key);
624  $doc->setContentKeyMode($configContent->mode);
625  $doc->setContentSearchProperty($configContent->searchProperty);
626  $doc->setContentRecursiveLevel($configContent->recursiveLevel);
627 
628  $doc->setContentFilter($configContent->filter);
629  $doc->setContentVerifyHasChild($configContent->verifyhaschild === true);
630  }
631  $out["storedContent"] = $doc->getContent();
632  } else {
633  $out["storedContent"] = null;
634  }
635  }
636  }
637 
638  break;
639 
640  default:
641  $out->error = sprintf(_("method %s not possible") , $method);
642  }
643  }
644  function addLogInData(&$action, &$out)
645  {
646  $l = $action->parent->GetLogMsg();
647  if (is_array($l) && (count($l) > 0)) {
648  foreach ($l as $k => $v) {
649  if ($d = json_decode($v)) $l[$k] = $d;
650  }
651  if (is_object($out)) {
652  $out->log = $l;
653  $action->parent->ClearLogMsg();
654  }
655  if (is_array($out)) {
656  $out["log"] = $l;
657  $action->parent->ClearLogMsg();
658  }
659  }
660  }
661 ?>
← centre documentaire © anakeen - published under CC License - Dynacase