Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
Class.ImportSingleDocument.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @package FDL
5 */
6 /**
7  * Import single documents
8  *
9  * @author Anakeen
10  * @package FDL
11  * @subpackage
12  */
13 /**
14  */
15 
16 include_once ("FDL/import_file.php");
17 
19 {
20  private $currentAttrid = "";
21  protected $dirid = 0;
22  protected $analyze = false;
23  protected $importFilePath = '';
24  protected $policy = 'add';
25  protected $orders = array();
26  protected $preValues = array();
27  /**
28  * @var bool verify attribute access (visibility "I")
29  */
30  protected $verifyAttributeAccess = true;
31  /**
32  * @var array folder id where insert the new document
33  */
34  protected $folderIds = array();
35  protected $keys = array(
36  'title',
37  null
38  );
39  protected $tcr = array();
40  protected $error = array();
41  public $dbaccess = '';
42  /**
43  * @var string family reference
44  */
45  public $famId;
46  /**
47  * @var string special logical name
48  */
49  public $specId;
50  /**
51  * @var string folder reference where insert document
52  */
53  public $folderId;
54  /**
55  * @var DocFam
56  */
57  private $doc;
58  /**
59  * @var
60  */
61  private $knownLogicalNames = array();
62 
63  public function __construct()
64  {
65 
66  $this->dbaccess = getDbAccess();
67  }
68 
69  public function analyzeOnly($analyze)
70  {
71  $this->analyze = $analyze;
72  }
73 
74  public function setPolicy($policy)
75  {
76  $this->policy = $policy;
77  }
78 
79  public function setPreValues(array $preValues)
80  {
81  $this->preValues = $preValues;
82  }
83  /**
84  * @param boolean $verifyAttributeAccess
85  */
87  {
88  $this->verifyAttributeAccess = $verifyAttributeAccess;
89  }
90  public function setTargetDirectory($dirid)
91  {
92  if ($dirid == '-') $dirid = 0;
93  $this->dirid = $dirid;
94  }
95  /**
96  * identify where to insert document
97  * @param array $dirid folder identifier
98  */
99  public function setTargetDirectories(array $dirid)
100  {
101  $this->folderIds = $dirid;
102  }
103  public function setFilePath($path)
104  {
105  $this->importFilePath = $path;
106  }
107 
108  public function setOrder(array $order)
109  {
110  $this->orders = $order;
111  }
112 
113  public function setKey(array $keys)
114  {
115  $this->keys = $keys;
116  if (!isset($this->keys[1])) $this->keys[1] = null;
117  }
118 
119  public function getError()
120  {
121  return implode("\n", $this->error);
122  }
123 
124  public function getImportResult()
125  {
126  return $this->tcr;
127  }
128  /**
129  * @return bool
130  */
131  public function hasError()
132  {
133  return (count($this->error) > 0);
134  }
135  /**
136  * short cut to call ErrorCode::getError
137  * @param $code
138  * @param null $args
139  */
140  private function setError($code, $args = null)
141  {
142  if ($code) {
143  $tArgs = array(
144  $code
145  );
146  $nargs = func_num_args();
147  for ($ip = 1; $ip < $nargs; $ip++) {
148  $tArgs[] = func_get_arg($ip);
149  }
150 
151  $this->error[] = call_user_func_array("ErrorCode::getError", $tArgs);
152  $this->tcr["err"] = $this->getError();
153  $this->tcr["action"] = "ignored";
154  }
155  }
156  /**
157  * import a single document from $data
158  * import line beginning with DOC
159  * @param array $data
160  * @return importSingleDocument
161  */
162  public function import(array $data)
163  {
164  // return structure
165  $this->tcr = array(
166  "err" => "",
167  "msg" => "",
168  "specmsg" => "",
169  "folderid" => 0,
170  "foldername" => "",
171  "filename" => "",
172  "title" => "",
173  "id" => "",
174  "values" => array() ,
175  "familyid" => 0,
176  "familyname" => "",
177  "action" => "-"
178  );
179  // like : DOC;120;...
180  $err = "";
181 
182  $this->famId = isset($data[1]) ? trim($data[1]) : '';
183  $this->specId = isset($data[2]) ? trim($data[2]) : '';
184  $this->folderId = isset($data[3]) ? trim($data[3]) : '';
185 
186  if (is_numeric($this->famId)) $fromid = $this->famId;
187  else $fromid = getFamIdFromName($this->dbaccess, $this->famId);
188  if ($fromid == 0) {
189  // no need test here it is done by checkDoc class DOC0005 DOC0006
190  $this->tcr["action"] = "ignored";
191  $this->tcr["err"] = sprintf(_("Not a family [%s]") , $this->famId);
192  return $this;
193  }
194  $tmpDoc = createDoc($this->dbaccess, $fromid);
195  if (!$tmpDoc) {
196  // no need test here it is done by checkDoc class DOC0007
197  $this->tcr["action"] = "ignored";
198  $this->tcr["err"] = sprintf(_("cannot create from family [%s]") , $this->famId);
199  return $this;
200  }
201 
202  $msg = ""; // information message
203  $tmpDoc->fromid = $fromid;
204  $this->tcr["familyid"] = $tmpDoc->fromid;
205  $this->tcr["familyname"] = $tmpDoc->getTitle($tmpDoc->fromid);
206  if ($this->specId > 0) {
207  $tmpDoc->id = $this->specId; // static id
208  $tmpDoc->initid = $this->specId;
209  } elseif (trim($this->specId) != "") {
210  if (!is_numeric(trim($this->specId))) {
211  $tmpDoc->name = trim($this->specId); // logical name
212  $docid = getIdFromName($this->dbaccess, $tmpDoc->name, $fromid);
213  if ($docid > 0) {
214  $tmpDoc->id = $docid;
215  $tmpDoc->initid = $docid;
216  }
217  }
218  }
219 
220  if ($tmpDoc->id > 0) {
221  $this->doc = new_doc($tmpDoc->dbaccess, $tmpDoc->id, true);
222  if (!$this->doc->isAffected()) $this->doc = $tmpDoc;
223  } else {
224  $this->doc = $tmpDoc;
225  }
226 
227  if ((intval($this->doc->id) == 0) || (!$this->doc->isAffected())) {
228 
229  $this->tcr["action"] = "added";
230  } else {
231  if ($this->doc->fromid != $fromid) {
232 
233  $this->tcr["id"] = $this->doc->id;
234  $this->setError("DOC0008", $this->doc->getTitle() , $this->doc->fromname, getNameFromId($this->dbaccess, $fromid));
235  return $this;
236  }
237  if ($this->doc->doctype == 'Z') {
238  if (!$this->analyze) $this->doc->undelete();
239  $this->tcr["msg"].= _("restore document") . "\n";
240  }
241 
242  if ($this->doc->locked == - 1) {
243  $this->tcr["id"] = $this->doc->id;
244  $this->setError("DOC0009", $this->doc->getTitle() , $this->doc->fromname);
245  return $this;
246  }
247 
248  $this->tcr["action"] = "updated";
249  $this->tcr["id"] = $this->doc->id;
250  $msg.= sprintf(_("update id [%d] ") , $this->doc->id);
251  }
252 
253  if ($this->hasError()) {
254 
255  return $this;
256  }
257  if (!$this->verifyAttributeAccess) {
258  $this->inhibitInvisibleAttributes($this->doc);
259  }
260  if (count($this->orders) == 0) {
261  $lattr = $this->doc->GetImportAttributes();
262  $this->orders = array_keys($lattr);
263  } else {
264  $lattr = $this->doc->GetNormalAttributes();
265  }
266  $extra = array();
267  $iattr = 4; // begin in 5th column
268  foreach ($this->orders as $attrid) {
269  if (isset($lattr[$attrid])) {
270  $attr = $lattr[$attrid];
271  if (isset($data[$iattr]) && ($data[$iattr] != "")) {
272  $dv = $data[$iattr];
273  if (!isUTF8($dv)) $dv = utf8_encode($dv);
274  if (($attr->type == "file") || ($attr->type == "image")) {
275  // insert file
276  $this->tcr["foldername"] = $this->importFilePath;
277  $this->tcr["filename"] = $dv;
278 
279  if (!$this->analyze) {
280  if ($attr->inArray()) {
281  $tabsfiles = $this->doc->rawValueToArray($dv);
282  $tvfids = array();
283  foreach ($tabsfiles as $fi) {
284  if (preg_match(PREGEXPFILE, $fi, $reg)) {
285  $tvfids[] = $fi;
286  } elseif (preg_match('/^http:/', $fi, $reg)) {
287  $tvfids[] = '';
288  } elseif ($fi) {
289  $absfile = "$this->importFilePath/$fi";
290  $err = AddVaultFile($this->dbaccess, $absfile, $this->analyze, $vfid);
291  if ($err != "") {
292  $this->setError("DOC0101", $err, $fi, $attrid, $this->doc->name);
293  } else {
294  $tvfids[] = $vfid;
295  }
296  } else {
297  $tvfids[] = '';
298  }
299  }
300  $err.= $this->doc->setValue($attr->id, $tvfids);
301  } else {
302  // one file only
303  if (preg_match(PREGEXPFILE, $dv, $reg)) {
304  $this->doc->setValue($attr->id, $dv);
305  $this->tcr["values"][$attr->getLabel() ] = $dv;
306  } elseif (preg_match('/^http:/', $dv, $reg)) {
307  // nothing
308 
309  } elseif ($dv) {
310  $absfile = "$this->importFilePath/$dv";
311  $err = AddVaultFile($this->dbaccess, $absfile, $this->analyze, $vfid);
312  if ($err != "") {
313 
314  $this->setError("DOC0102", $err, $dv, $attrid, $this->doc->name);
315  } else {
316  $err = $this->doc->setValue($attr->id, $vfid);
317  if ($err) $this->setError("DOC0103", $err, $dv, $attrid, $this->doc->name);
318  }
319  }
320  }
321  } else {
322  // just for analyze
323  $this->tcr["values"][$attr->getLabel() ] = $dv;
324  }
325  } else {
326  if ($attr->type == "htmltext" && !$this->analyze) {
327  $this->currentAttrid = $attrid;
328  $dv = preg_replace_callback('/(<img.*?src=")file:\/\/(.*?)(".*?\/>)/', function ($matches)
329  {
330  return $this->importHtmltextFiles($matches);
331  }
332  , $dv);
333  }
334  if ($attr->type == "docid" || $attr->type == "account" || $attr->type == "thesaurus") {
335  /**
336  * Check for unknown logical names in docid's raw value
337  */
338  if (is_string($dv)) {
339  $dv = str_replace("\\n", "\n", $dv);
340  }
341  $unknownLogicalNames = $this->getUnknownDocIdLogicalNames($this->doc, $attr, $dv);
342 
343  if (count($unknownLogicalNames) > 0) {
344 
345  foreach ($unknownLogicalNames as $logicalName) {
346  $warnMsg = sprintf(_("Unknown logical name '%s' in attribute '%s'.") , $logicalName, $attr->id);
347  $this->doc->log->warning($warnMsg);
348  $this->tcr['specmsg'].= (($this->tcr['specmsg'] != '') ? "\n" . $warnMsg : $warnMsg);
349  }
350  }
351  }
352  $errv = $this->doc->setValue($attr->id, $dv);
353  if ($errv) {
354  $this->setError("DOC0100", $attr->id, $errv);
355  }
356  $this->tcr["values"][$attr->getLabel() ] = $dv;
357  }
358  }
359  } else if (strpos($attrid, "extra:") === 0) {
360  $attr = substr($attrid, strlen("extra:"));
361  if (isset($data[$iattr]) && ($data[$iattr] != "")) {
362  $dv = str_replace(array(
363  '\n',
364  ALTSEPCHAR
365  ) , array(
366  "\n",
367  ';'
368  ) , $data[$iattr]);
369  if (!isUTF8($dv)) $dv = utf8_encode($dv);
370  $extra[$attr] = $dv;
371  }
372  }
373  $iattr++;
374  }
375  if ((!$this->hasError()) && (!$this->analyze)) {
376  if (($this->doc->id > 0) || ($this->policy != "update")) {
377  $err = $this->doc->preImport($extra);
378  if ($err) $this->setError("DOC0104", $this->doc->name, $err);
379  }
380  }
381  // update title in finish
382  if (!$this->analyze) $this->doc->refresh(); // compute read attribute
383  if ($this->hasError()) {
384 
385  return $this;
386  }
387 
388  if (($this->doc->id == "") && ($this->doc->name == "")) {
389  switch ($this->policy) {
390  case "add":
391  $this->tcr["action"] = "added"; # N_("added")
392  if (!$this->analyze) {
393 
394  if ($this->doc->id == "") {
395  // insert default values
396  foreach ($this->preValues as $k => $v) {
397  $this->doc->setValue($k, $v);
398  }
399  $err = $this->doc->preImport($extra);
400  if ($err != "") {
401  if ($err) {
402  $this->setError("DOC0105", $this->doc->name, $err);
403  }
404  return $this;
405  }
406  $err = $this->doc->Add();
407 
408  if ($err) {
409  $this->setError("DOC0107", $this->doc->name, $err);
410  }
411  }
412  if ($err == "") {
413  $this->tcr["id"] = $this->doc->id;
414  $msg.= $err . sprintf(_("add %s id [%d] ") , $this->doc->title, $this->doc->id);
415  $this->tcr["msg"] = sprintf(_("add %s id [%d] ") , $this->doc->title, $this->doc->id);
416  } else {
417  $this->tcr["action"] = "ignored";
418  }
419  } else {
420  $this->doc->RefreshTitle();
421  $this->tcr["msg"] = sprintf(_("%s to be add") , $this->doc->title);
422  }
423  break;
424 
425  case "update":
426  $this->doc->RefreshTitle();
427  $lsdoc = $this->doc->GetDocWithSameTitle($this->keys[0], $this->keys[1]);
428  // test if same doc in database
429  if (count($lsdoc) == 0) {
430  $this->tcr["action"] = "added";
431  if (!$this->analyze) {
432  if ($this->doc->id == "") {
433  // insert default values
434  foreach ($this->preValues as $k => $v) {
435  if ($this->doc->getRawValue($k) == "") {
436  $this->doc->setValue($k, $v);
437  }
438  }
439  $err = $this->doc->preImport($extra);
440  if ($err != "") {
441 
442  if ($err) {
443  $this->setError("DOC0106", $this->doc->name, $err);
444  }
445 
446  return $this;
447  }
448  $err = $this->doc->Add();
449 
450  if ($err) {
451  $this->setError("DOC0108", $this->doc->name, $err);
452  }
453  }
454  if ($err == "") {
455  $this->tcr["id"] = $this->doc->id;
456  $this->tcr["action"] = "added";
457  $this->tcr["msg"] = sprintf(_("add id [%d] ") , $this->doc->id);
458  } else {
459  $this->tcr["action"] = "ignored";
460  }
461  } else {
462  $this->tcr["msg"] = sprintf(_("%s to be add") , $this->doc->title);
463  }
464  } elseif (count($lsdoc) == 1) {
465  // no double title found
466  $this->tcr["action"] = "updated"; # N_("updated")
467 
468  /*
469  * @var Doc $doc
470  */
471  $doc = $lsdoc[0];
472  if (!$this->analyze) {
473  $err = $doc->preImport($extra);
474  if ($err != "") {
475  if ($err) {
476  $this->setError("DOC0109", $this->doc->name, $err);
477  }
478 
479  return $this;
480  }
481  }
482  $err = $doc->transfertValuesFrom($this->doc);
483  if ($err != "") {
484  $this->setError("DOC0113", $this->doc->name, $err);
485 
486  return $this;
487  }
488  $this->doc = $doc;
489  $this->tcr["id"] = $this->doc->id;
490  if (!$this->analyze) {
491  if (($this->specId != "") && (!is_numeric(trim($this->specId))) && ($this->doc->name == "")) {
492  $this->doc->name = $this->specId;
493  }
494  $this->tcr["msg"] = sprintf(_("update %s [%d] ") , $this->doc->title, $this->doc->id);
495  } else {
496  $this->tcr["msg"] = sprintf(_("to be update %s [%d] ") , $this->doc->title, $this->doc->id);
497  }
498  } else {
499  //more than one double
500  $this->tcr["action"] = "ignored"; # N_("ignored")
501  $this->setError("DOC0110", $this->doc->getTitle());
502 
503  return $this;
504  }
505 
506  break;
507 
508  case "keep":
509  $this->doc->RefreshTitle();
510  $lsdoc = $this->doc->GetDocWithSameTitle($this->keys[0], $this->keys[1]);
511  if (count($lsdoc) == 0) {
512  $this->tcr["action"] = "added";
513  if (!$this->analyze) {
514  if ($this->doc->id == "") {
515  // insert default values
516  foreach ($this->preValues as $k => $v) {
517  if ($this->doc->getRawValue($k) == "") {
518  $this->doc->setValue($k, $v);
519  }
520  }
521  $err = $this->doc->Add();
522  }
523  $this->tcr["id"] = $this->doc->id;
524  $msg.= $err . sprintf(_("add id [%d] ") , $this->doc->id);
525  } else {
526  $this->tcr["msg"] = sprintf(_("%s to be add") , $this->doc->title);
527  }
528  } else {
529  //more than one double
530  $this->tcr["action"] = "ignored";
531  $this->tcr["msg"] = sprintf(_("similar document %s found. keep similar") , $this->doc->title);
532 
533  return $this;
534  }
535 
536  break;
537  }
538  } else {
539  // add special id
540  if (!$this->doc->isAffected()) {
541  $this->tcr["action"] = "added";
542  if (!$this->analyze) {
543  // insert default values
544  foreach ($this->preValues as $k => $v) {
545  if ($this->doc->getRawValue($k) == "") {
546  $this->doc->setValue($k, $v);
547  }
548  }
549  $err = $this->doc->preImport($extra);
550  if ($err != "") {
551  $this->setError("DOC0111", $this->doc->name, $err);
552  return $this;
553  }
554  $err = $this->doc->Add();
555  if ($err != "") {
556  $this->setError("DOC0111", $this->doc->name, $err);
557  return $this;
558  }
559  $this->tcr["id"] = $this->doc->id;
560  $msg.= $err . sprintf(_("add %s id [%d] ") , $this->doc->title, $this->doc->id);
561  $this->tcr["msg"] = sprintf(_("add %s id [%d] ") , $this->doc->title, $this->doc->id);
562  } else {
563  $this->doc->RefreshTitle();
564  $this->tcr["id"] = $this->doc->id;
565  $this->tcr["msg"] = sprintf(_("%s to be add") , $this->doc->title);
566  }
567  }
568  }
569  $this->tcr["title"] = $this->doc->title;
570  if ($this->hasError()) {
571  return $this;
572  }
573  if (!$this->analyze) {
574  if ($this->doc->isAffected()) {
575  $warnMsg = $this->doc->Refresh();
576  $this->tcr["specmsg"].= (($this->tcr["specmsg"] != '') ? "\n" . $warnMsg : $warnMsg); // compute read attribute
577  $msg.= $this->doc->postStore(); // compute read attribute
578  $err = $this->doc->modify();
579  if ($err == "-") $err = ""; // not really an error add addfile must be tested after
580  if ($err == "") {
581  $this->doc->addHistoryEntry(sprintf(_("updated by import")));
582  $msg.= $this->doc->postImport($extra);
583  } else {
584  $this->setError("DOC0112", $this->doc->name, $err);
585  }
586 
587  $this->tcr["msg"].= $msg;
588  }
589  }
590  if ($this->hasError()) {
591  return $this;
592  }
593  //------------------
594  // add in folder
595  if ($this->folderId != "-") {
596  if ($this->folderId) {
597  $this->addIntoFolder($this->folderId);
598  } elseif ($this->dirid) {
599  $this->addIntoFolder($this->dirid);
600  }
601  }
602  if ($this->folderIds) {
603  foreach ($this->folderIds as $fid) {
604  if ($fid) $this->addIntoFolder($fid);
605  }
606  }
607  if ($this->doc->id) {
608  clearCacheDoc($this->doc->id);
609  } // clear cache to clean unused
610  return $this;
611  }
612 
613  protected function inhibitInvisibleAttributes(Doc $doc)
614  {
615  $oas = $doc->getNormalAttributes();
616  foreach ($oas as $oa) {
617  if ($oa->mvisibility === "I") {
618  $oa->setVisibility("H");
619  }
620  }
621  }
622 
623  public function importHtmltextFiles($matches)
624  {
625  $dvCahnged = $matches[0];
626  $absfile = "$this->importFilePath/$matches[2]";
627  $err = AddVaultFile(getDbAccess() , $absfile, $this->analyze, $vfid);
628  if ($err != "" || $this->analyze) {
629  $this->setError("DOC0102", $err, $matches[2], $this->currentAttrid, $this->doc->name);
630  } else {
631  $fileImgAttrid = "img_file";
632  /*
633  * @var Doc $imgDoc
634  */
635  $imgDoc = createDoc(getDbAccess() , "IMAGE");
636 
637  if (is_object($imgDoc)) {
638  $imgDoc->setAttributeValue($fileImgAttrid, $vfid);
639  $err = $imgDoc->store();
640  if ($err) $this->setError("DOC0100", $this->currentAttrid, $err);
641  else $dvCahnged = $matches[1] . htmlspecialchars($imgDoc->getFileLink($fileImgAttrid)) . $matches[3];
642  }
643  }
644  return $dvCahnged;
645  }
646  /**
647  * insert imported document into a folder
648  * @param string $folderId
649  */
650  protected function addIntoFolder($folderId)
651  {
652  if ($folderId) {
653  /**
654  * @var $dir Dir
655  */
656  $dir = new_Doc($this->dbaccess, $folderId);
657  if ($dir->isAlive()) {
658  $this->tcr["folderid"] = $dir->id;
659  $this->tcr["foldername"] = dirname($this->importFilePath) . "/" . $dir->title;
660  if (!$this->analyze) {
661  if (method_exists($dir, "insertDocument")) {
662  $err = $dir->insertDocument($this->doc->id);
663  if ($err) $this->setError("DOC0200", $this->doc->name, $dir->getTitle() , $err);
664  } else {
665  $this->setError("DOC0202", $dir->getTitle() , $dir->fromname, $this->doc->name);
666  }
667  }
668  $this->tcr["msg"].= " " . sprintf(_("and add in %s folder ") , $dir->title);
669  } else {
670  $this->setError("DOC0201", $folderId, ($this->doc->name) ? $this->doc->name : $this->doc->getTitle());
671  }
672  }
673  }
674  /**
675  * Parse a docid's raw value (single or multiple) for unknown logical names
676  *
677  * @param Doc $doc
678  * @param NormalAttribute $oattr
679  * @param string $value docid's raw value
680  * @return array List of unknown logical names referenced by the value
681  */
682  protected function getUnknownDocIdLogicalNames(Doc & $doc, NormalAttribute & $oattr, $value)
683  {
684  $res = array();
685  if ($value === ' ') {
686  return $res;
687  }
688  $value = trim($value, " \x0B\r"); // suppress white spaces end & begin
689  if ($oattr->repeat) {
690  $tvalues = $doc->rawValueToArray($value);
691  } else {
692  $tvalues[] = $value;
693  }
694  foreach ($tvalues as $kvalue => $avalue) {
695  if (($avalue != "") && ($avalue != "\t")) {
696  $unresolvedLogicalNames = array();
697  $tvalues[$kvalue] = $doc->resolveDocIdLogicalNames($oattr, $avalue, $unresolvedLogicalNames, $this->knownLogicalNames);
698  if (count($unresolvedLogicalNames) > 0) {
699  $res = array_merge($res, $unresolvedLogicalNames);
700  }
701  }
702  }
703  return $res;
704  }
705  /**
706  * Set the list of known logical names to check for unknown logical names
707  * @param array $knownLogicalNames List of known logical names
708  * @return array|bool Return the previous list of known logical names or bool(false) if the given list is not an array
709  */
710  public function setKnownLogicalNames($knownLogicalNames = array())
711  {
712  if (!is_array($knownLogicalNames)) {
713  return false;
714  }
715  $old = $this->knownLogicalNames;
716  $this->knownLogicalNames = $knownLogicalNames;
717  return $old;
718  }
719 }
getNormalAttributes($onlyopt=false)
Definition: Class.Doc.php:2387
if(substr($wsh, 0, 1)!= '/') $args
static rawValueToArray($v)
Definition: Class.Doc.php:6228
clearCacheDoc($id=0)
const PREGEXPFILE
Definition: Class.Doc.php:54
const ALTSEPCHAR
Definition: import_file.php:25
isUTF8($string)
Definition: Lib.Common.php:748
$docid
Definition: cleanFamily.php:13
getUnknownDocIdLogicalNames(Doc &$doc, NormalAttribute &$oattr, $value)
setVerifyAttributeAccess($verifyAttributeAccess)
$path
Definition: dav.php:39
createDoc($dbaccess, $fromid, $control=true, $defaultvalues=true, $temporary=false)
AddVaultFile($dbaccess, $path, $analyze, &$vid)
getFamIdFromName($dbaccess, $name)
getDbAccess()
Definition: Lib.Common.php:368
setKnownLogicalNames($knownLogicalNames=array())
new_Doc($dbaccess, $id= '', $latest=false)
$dir
Definition: resizeimg.php:144
getNameFromId($dbaccess, $id)
resolveDocIdLogicalNames(NormalAttribute &$oattr, $avalue, &$unknownLogicalNames=array(), &$knownLogicalNames=array())
Definition: Class.Doc.php:9559
getIdFromName($dbaccess, $name)
if($file) if($subject==""&&$file) if($subject=="") $err
N_($s)
Definition: Lib.Common.php:18
$value
$data
← centre documentaire © anakeen