dolibarr 21.0.0-beta
doc_generic_product_odt.modules.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2010-2012 Laurent Destailleur <eldy@products.sourceforge.net>
3 * Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
4 * Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
5 * Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
6 *
7* This program is free software; you can redistribute it and/or modify
8* it under the terms of the GNU General Public License as published by
9* the Free Software Foundation; either version 3 of the License, or
10* (at your option) any later version.
11*
12* This program is distributed in the hope that it will be useful,
13* but WITHOUT ANY WARRANTY; without even the implied warranty of
14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15* GNU General Public License for more details.
16*
17* You should have received a copy of the GNU General Public License
18* along with this program. If not, see <https://www.gnu.org/licenses/>.
19* or see https://www.gnu.org/
20*/
21
28require_once DOL_DOCUMENT_ROOT.'/core/modules/product/modules_product.class.php';
29require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
30require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
31require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
32require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
33require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php';
34
35
40{
45 public $version = 'dolibarr';
46
47
53 public function __construct($db)
54 {
55 global $conf, $langs, $mysoc;
56
57 // Load translation files required by the page
58 $langs->loadLangs(array("main", "companies"));
59
60 $this->db = $db;
61 $this->name = "ODT templates";
62 $this->description = $langs->trans("DocumentModelOdt");
63 $this->scandir = 'PRODUCT_ADDON_PDF_ODT_PATH'; // Name of constant that is used to save list of directories to scan
64
65 // Page size for A4 format
66 $this->type = 'odt';
67 $this->page_largeur = 0;
68 $this->page_hauteur = 0;
69 $this->format = array($this->page_largeur, $this->page_hauteur);
70 $this->marge_gauche = 0;
71 $this->marge_droite = 0;
72 $this->marge_haute = 0;
73 $this->marge_basse = 0;
74
75 $this->option_logo = 1; // Display logo
76 $this->option_tva = 0; // Manage the vat option PRODUCT_TVAOPTION
77 $this->option_modereg = 0; // Display payment mode
78 $this->option_condreg = 0; // Display payment terms
79 $this->option_multilang = 1; // Available in several languages
80 $this->option_escompte = 0; // Displays if there has been a discount
81 $this->option_credit_note = 0; // Support credit notes
82 $this->option_freetext = 1; // Support add of a personalised text
83 $this->option_draft_watermark = 0; // Support add of a watermark on drafts
84
85 if ($mysoc === null) {
86 dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'. getCallerInfoString(), LOG_ERR);
87 return;
88 }
89
90 // Get source company
91 $this->emetteur = $mysoc;
92 if (!$this->emetteur->country_code) {
93 $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined
94 }
95 }
96
97
104 public function info($langs)
105 {
106 global $conf, $langs;
107
108 // Load translation files required by the page
109 $langs->loadLangs(array("errors", "companies"));
110
111 $form = new Form($this->db);
112
113 $texte = $this->description.".<br>\n";
114 $texte .= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST" enctype="multipart/form-data">';
115 $texte .= '<input type="hidden" name="token" value="'.newToken().'">';
116 $texte .= '<input type="hidden" name="page_y" value="">';
117 $texte .= '<input type="hidden" name="action" value="setModuleOptions">';
118 $texte .= '<input type="hidden" name="param1" value="PRODUCT_ADDON_PDF_ODT_PATH">';
119 $texte .= '<table class="nobordernopadding" width="100%">';
120
121 // List of directories area
122 $texte .= '<tr><td>';
123 $texttitle = $langs->trans("ListOfDirectories");
124 $listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim($conf->global->PRODUCT_ADDON_PDF_ODT_PATH)));
125 $listoffiles = array();
126 foreach ($listofdir as $key => $tmpdir) {
127 $tmpdir = trim($tmpdir);
128 $tmpdir = preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir);
129 if (!$tmpdir) {
130 unset($listofdir[$key]);
131 continue;
132 }
133 if (!is_dir($tmpdir)) {
134 $texttitle .= img_warning($langs->trans("ErrorDirNotFound", $tmpdir), '');
135 } else {
136 $tmpfiles = dol_dir_list($tmpdir, 'files', 0, '\.(ods|odt)');
137 if (count($tmpfiles)) {
138 $listoffiles = array_merge($listoffiles, $tmpfiles);
139 }
140 }
141 }
142 $texthelp = $langs->trans("ListOfDirectoriesForModelGenODT");
143 $texthelp .= '<br><br><span class="opacitymedium">'.$langs->trans("ExampleOfDirectoriesForModelGen").'</span>';
144 // Add list of substitution keys
145 $texthelp .= '<br>'.$langs->trans("FollowingSubstitutionKeysCanBeUsed").'<br>';
146 $texthelp .= $langs->transnoentitiesnoconv("FullListOnOnlineDocumentation"); // This contains an url, we don't modify it
147
148 $texte .= $form->textwithpicto($texttitle, $texthelp, 1, 'help', '', 1, 3, $this->name);
149 $texte .= '<div><div style="display: inline-block; min-width: 100px; vertical-align: middle;">';
150 $texte .= '<textarea class="flat" cols="60" name="value1">';
151 $texte .= getDolGlobalString('PRODUCT_ADDON_PDF_ODT_PATH');
152 $texte .= '</textarea>';
153 $texte .= '</div><div style="display: inline-block; vertical-align: middle;">';
154 $texte .= '<input type="submit" class="button button-edit reposition smallpaddingimp" name="modify" value="'.dol_escape_htmltag($langs->trans("Modify")).'">';
155 $texte .= '<br></div></div>';
156
157 // Scan directories
158 $nbofiles = count($listoffiles);
159 if (getDolGlobalString('PRODUCT_ADDON_PDF_ODT_PATH')) {
160 $texte .= $langs->trans("NumberOfModelFilesFound").': <b>'.count($listoffiles).'</b>';
161 }
162
163 if ($nbofiles) {
164 $texte .= '<div id="div_'.get_class($this).'" class="hiddenx">';
165 // Show list of found files
166 foreach ($listoffiles as $file) {
167 $texte .= '- '.$file['name'];
168 $texte .= ' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=products/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a>';
169 $texte .= ' &nbsp; <a class="reposition" href="'.$_SERVER["PHP_SELF"].'?modulepart=doctemplates&keyforuploaddir=PRODUCT_ADDON_PDF_ODT_PATH&action=deletefile&token='.newToken().'&file='.urlencode(basename($file['name'])).'">'.img_picto('', 'delete').'</a>';
170 $texte .= '<br>';
171 }
172 $texte .= '</div>';
173 }
174 // Add input to upload a new template file.
175 $texte .= '<div>'.$langs->trans("UploadNewTemplate");
176 $maxfilesizearray = getMaxFileSizeArray();
177 $maxmin = $maxfilesizearray['maxmin'];
178 if ($maxmin > 0) {
179 $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
180 }
181 $texte .= ' <input type="file" name="uploadfile">';
182 $texte .= '<input type="hidden" value="PRODUCT_ADDON_PDF_ODT_PATH" name="keyforuploaddir">';
183 $texte .= '<input type="submit" class="button smallpaddingimp reposition" value="'.dol_escape_htmltag($langs->trans("Upload")).'" name="upload">';
184 $texte .= '</div>';
185
186 $texte .= '</td>';
187
188 $texte .= '</tr>';
189
190 $texte .= '</table>';
191 $texte .= '</form>';
192
193 return $texte;
194 }
195
196 // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
208 public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
209 {
210 // phpcs:enable
211 global $product, $langs, $conf, $mysoc, $hookmanager, $user;
212
213 if (empty($srctemplatepath)) {
214 dol_syslog("doc_generic_odt::write_file parameter srctemplatepath empty", LOG_WARNING);
215 return -1;
216 }
217
218 // Add odtgeneration hook
219 if (!is_object($hookmanager)) {
220 include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
221 $hookmanager = new HookManager($this->db);
222 }
223 $hookmanager->initHooks(array('odtgeneration'));
224 global $action;
225
226 if (!is_object($outputlangs)) {
227 $outputlangs = $langs;
228 }
229 $sav_charset_output = $outputlangs->charset_output;
230 $outputlangs->charset_output = 'UTF-8';
231
232 // Load translation files required by the page
233 $outputlangs->loadLangs(array("main", "dict", "companies", "bills"));
234
235 if ($conf->product->dir_output) {
236 // If $object is id instead of object
237 if (!is_object($object)) {
238 $id = $object;
239 $object = new Product($this->db);
240 $result = $object->fetch($id);
241 if ($result < 0) {
242 dol_print_error($this->db, $object->error);
243 return -1;
244 }
245 }
246 $productFournisseur = new ProductFournisseur($this->db);
247 $supplierprices = $productFournisseur->list_product_fournisseur_price($object->id);
248 $object->supplierprices = $supplierprices;
249
250 $dir = $conf->product->dir_output;
251 $objectref = dol_sanitizeFileName($object->ref);
252 if (!preg_match('/specimen/i', $objectref)) {
253 $dir .= "/".$objectref;
254 }
255 $file = $dir."/".$objectref.".odt";
256
257 if (!file_exists($dir)) {
258 if (dol_mkdir($dir) < 0) {
259 $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir);
260 return -1;
261 }
262 }
263
264 if (file_exists($dir)) {
265 //print "srctemplatepath=".$srctemplatepath; // Src filename
266 $newfile = basename($srctemplatepath);
267 $newfiletmp = preg_replace('/\.od[ts]/i', '', $newfile);
268 $newfiletmp = preg_replace('/template_/i', '', $newfiletmp);
269 $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp);
270
271 $newfiletmp = $objectref . '_' . $newfiletmp;
272
273 // Get extension (ods or odt)
274 $newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
275 if (getDolGlobalString('MAIN_DOC_USE_TIMING')) {
276 $format = getDolGlobalString('MAIN_DOC_USE_TIMING');
277 if ($format == '1') {
278 $format = '%Y%m%d%H%M%S';
279 }
280 $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat;
281 } else {
282 $filename = $newfiletmp . '.' . $newfileformat;
283 }
284 $file = $dir . '/' . $filename;
285 //print "newdir=".$dir;
286 //print "newfile=".$newfile;
287 //print "file=".$file;
288 //print "conf->product->dir_temp=".$conf->product->dir_temp;
289
290 dol_mkdir($conf->product->dir_temp);
291 if (!is_writable($conf->product->dir_temp)) {
292 $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->product->dir_temp);
293 dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
294 return -1;
295 }
296
297 // If CUSTOMER contact defined on product, we use it
298 $usecontact = false;
299 $arrayidcontact = $object->getIdContact('external', 'CUSTOMER');
300 if (count($arrayidcontact) > 0) {
301 $usecontact = true;
302 $result = $object->fetch_contact($arrayidcontact[0]);
303 }
304
305 // Recipient name
306 $contactobject = null;
307 if (!empty($usecontact)) {
308 // We can use the company of contact instead of thirdparty company
309 if ($object->contact->socid != $object->thirdparty->id && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) || getDolGlobalString('MAIN_USE_COMPANY_NAME_OF_CONTACT'))) {
310 $object->contact->fetch_thirdparty();
311 $socobject = $object->contact->thirdparty;
312 $contactobject = $object->contact;
313 } else {
314 $socobject = $object->thirdparty;
315 // if we have a CUSTOMER contact and we don't use it as thirdparty recipient we store the contact object for later use
316 $contactobject = $object->contact;
317 }
318 } else {
319 $socobject = $object->thirdparty;
320 }
321 // Make substitution
322 $substitutionarray = array(
323 '__FROM_NAME__' => $this->emetteur->name,
324 '__FROM_EMAIL__' => $this->emetteur->email,
325 '__TOTAL_TTC__' => $object->total_ttc,
326 '__TOTAL_HT__' => $object->total_ht,
327 '__TOTAL_VAT__' => $object->total_tva
328 );
329 complete_substitutions_array($substitutionarray, $langs, $object);
330 // Call the ODTSubstitution hook
331 $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs, 'substitutionarray' => &$substitutionarray);
332 $reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
333
334 // Line of free text
335 $newfreetext = '';
336 $paramfreetext = 'PRODUCT_FREE_TEXT';
337 if (getDolGlobalString($paramfreetext)) {
338 $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
339 }
340
341 // Open and load template
342 require_once ODTPHP_PATH.'odf.php';
343 try {
344 $odfHandler = new Odf(
345 $srctemplatepath,
346 array(
347 'PATH_TO_TMP' => $conf->product->dir_temp,
348 'ZIP_PROXY' => getDolGlobalString('MAIN_ODF_ZIP_PROXY', 'PclZipProxy'), // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy.
349 'DELIMITER_LEFT' => '{',
350 'DELIMITER_RIGHT' => '}'
351 )
352 );
353 } catch (Exception $e) {
354 $this->error = $e->getMessage();
355 dol_syslog($e->getMessage(), LOG_INFO);
356 return -1;
357 }
358 // After construction $odfHandler->contentXml contains content and
359 // [!-- BEGIN row.lines --]*[!-- END row.lines --] has been replaced by
360 // [!-- BEGIN lines --]*[!-- END lines --]
361 //print html_entity_decode($odfHandler->__toString());
362 //print exit;
363
364
365 // Make substitutions into odt of freetext
366 try {
367 $odfHandler->setVars('free_text', $newfreetext, true, 'UTF-8');
368 } catch (OdfException $e) {
369 dol_syslog($e->getMessage(), LOG_INFO);
370 }
371
372 // Define substitution array
373 $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $object);
374 $array_object_from_properties = $this->get_substitutionarray_each_var_object($object, $outputlangs);
375 //$array_objet=$this->get_substitutionarray_object($object,$outputlangs);
376 $array_user = $this->get_substitutionarray_user($user, $outputlangs);
377 $array_soc = $this->get_substitutionarray_mysoc($mysoc, $outputlangs);
378 $array_thirdparty = $this->get_substitutionarray_thirdparty($socobject, $outputlangs);
379 $array_other = $this->get_substitutionarray_other($outputlangs);
380 // retrieve contact information for use in object as contact_xxx tags
381 $array_thirdparty_contact = array();
382 if ($usecontact && is_object($contactobject)) {
383 $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact');
384 }
385
386 $tmparray = array_merge($substitutionarray, $array_object_from_properties, $array_user, $array_soc, $array_thirdparty, $array_other, $array_thirdparty_contact);
387 complete_substitutions_array($tmparray, $outputlangs, $object);
388
389 // Call the ODTSubstitution hook
390 $parameters = array('odfHandler' => &$odfHandler, 'file' => $file, 'object' => $object, 'outputlangs' => $outputlangs, 'substitutionarray' => &$tmparray);
391 $reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
392
393 foreach ($tmparray as $key => $value) {
394 try {
395 if (preg_match('/logo$/', $key)) { // Image
396 if (file_exists($value)) {
397 $odfHandler->setImage($key, $value);
398 } else {
399 $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8');
400 }
401 } else { // Text
402 $odfHandler->setVars($key, $value, true, 'UTF-8');
403 }
404 } catch (OdfException $e) {
405 dol_syslog($e->getMessage(), LOG_INFO);
406 }
407 }
408 // Replace tags of lines
409 try {
410 $listlines = $odfHandler->setSegment('supplierprices');
411 if (!empty($object->supplierprices)) {
412 foreach ($object->supplierprices as $supplierprice) {
413 $array_lines = $this->get_substitutionarray_each_var_object($supplierprice, $outputlangs);
414 complete_substitutions_array($array_lines, $outputlangs, $object, $supplierprice, "completesubstitutionarray_lines");
415 // Call the ODTSubstitutionLine hook
416 $parameters = array('odfHandler' => &$odfHandler, 'file' => $file, 'object' => $object, 'outputlangs' => $outputlangs, 'substitutionarray' => &$array_lines, 'line' => $supplierprice);
417 $reshook = $hookmanager->executeHooks('ODTSubstitutionLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
418 foreach ($array_lines as $key => $val) {
419 try {
420 $listlines->setVars($key, $val, true, 'UTF-8');
421 } catch (SegmentException $e) {
422 dol_syslog($e->getMessage(), LOG_INFO);
423 }
424 }
425 $listlines->merge();
426 }
427 }
428 $odfHandler->mergeSegment($listlines);
429 } catch (OdfException $e) {
430 $this->error = $e->getMessage();
431 dol_syslog($this->error, LOG_WARNING);
432 return -1;
433 }
434
435 // Replace labels translated
436 $tmparray = $outputlangs->get_translations_for_substitutions();
437 foreach ($tmparray as $key => $value) {
438 try {
439 $odfHandler->setVars($key, $value, true, 'UTF-8');
440 } catch (OdfException $e) {
441 dol_syslog($e->getMessage(), LOG_INFO);
442 }
443 }
444
445 // Call the beforeODTSave hook
446 $parameters = array('odfHandler' => &$odfHandler, 'file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
447 $reshook = $hookmanager->executeHooks('beforeODTSave', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
448
449 // Write new file
450 if (getDolGlobalString('MAIN_ODT_AS_PDF')) {
451 try {
452 $odfHandler->exportAsAttachedPDF($file);
453 } catch (Exception $e) {
454 $this->error = $e->getMessage();
455 dol_syslog($e->getMessage(), LOG_INFO);
456 return -1;
457 }
458 } else {
459 try {
460 $odfHandler->saveToDisk($file);
461 } catch (Exception $e) {
462 $this->error = $e->getMessage();
463 dol_syslog($e->getMessage(), LOG_INFO);
464 return -1;
465 }
466 }
467
468 $parameters = array('odfHandler' => &$odfHandler, 'file' => $file, 'object' => $object, 'outputlangs' => $outputlangs, 'substitutionarray' => &$tmparray);
469 $reshook = $hookmanager->executeHooks('afterODTCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
470
471 dolChmod($file);
472
473 $odfHandler = null; // Destroy object
474
475 $this->result = array('fullpath' => $file);
476
477 return 1; // Success
478 } else {
479 $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir);
480 return -1;
481 }
482 }
483
484 return -1;
485 }
486}
$id
Definition account.php:48
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:66
get_substitutionarray_each_var_object(&$object, $outputlangs, $recursive=1)
Define array with couple substitution key => substitution value.
get_substitutionarray_mysoc($mysoc, $outputlangs)
Define array with couple substitution key => substitution value.
get_substitutionarray_contact($object, $outputlangs, $array_key='object')
Define array with couple substitution key => substitution value.
get_substitutionarray_other($outputlangs)
Define array with couple substitution key => substitution value.
get_substitutionarray_thirdparty($object, $outputlangs, $array_key='company')
Define array with couple substitution key => substitution value For example {company_name}...
get_substitutionarray_user($user, $outputlangs)
Define array with couple substitution key => substitution value.
Class to manage generation of HTML components Only common components must be here.
Class to manage hooks.
Parent class to manage intervention document templates.
Class to manage predefined suppliers products.
Class to manage products or services.
Class to build documents using ODF templates generator.
info($langs)
Return description of a module.
write_file($object, $outputlangs, $srctemplatepath='', $hidedetails=0, $hidedesc=0, $hideref=0)
Function to build a document on disk using the generic odt module.
print $script_file $mode $langs defaultlang(is_numeric($duration_value) ? " delay=". $duration_value :"").(is_numeric($duration_value2) ? " after cd cd cd description as description
Only used if Module[ID]Desc translation string is not found.
dol_dir_list($utf8_path, $types="all", $recursive=0, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=0, $relativename="", $donotfollowsymlinks=0, $nbsecondsold=0)
Scan a directory and return a list of files/directories.
Definition files.lib.php:63
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
getCallerInfoString()
Get caller info as a string that can be appended to a log message.
dolChmod($filepath, $newmask='')
Change mod of a file.
dol_now($mode='auto')
Return date for now.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
newToken()
Return the value of token currently saved into session with name 'newtoken'.
complete_substitutions_array(&$substitutionarray, $outputlangs, $object=null, $parameters=null, $callfunc="completesubstitutionarray")
Complete the $substitutionarray with more entries coming from external module that had set the "subst...
make_substitutions($text, $substitutionarray, $outputlangs=null, $converttextinhtmlifnecessary=0)
Make substitution into a text string, replacing keys with vals from $substitutionarray (oldval=>newva...
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $object=null, $include=null)
Return array of possible common substitutions.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
dol_mkdir($dir, $dataroot='', $newmask='')
Creation of a directory (this can create recursive subdir)
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79
if(preg_match('/crypted:/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
Definition repair.php:149
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition repair.php:152
getMaxFileSizeArray()
Return the max allowed for file upload.