dolibarr  19.0.0-dev
modulehelp.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
3  * Copyright (C) 2017 Regis Houssin <regis.houssin@inodbox.com>
4  * Copyright (C) 2022 Charlene Benke <charlene@patas-monkey.com>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <https://www.gnu.org/licenses/>.
18  */
19 
25 if (!defined('NOREQUIREMENU')) {
26  define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu
27 }
28 if (!defined('NOTOKENRENEWAL')) {
29  define('NOTOKENRENEWAL', '1'); // Disabled because this page is into a popup on module search page and we want to avoid to have an Anti CSRF token error (done if MAIN_SECURITY_CSRF_WITH_TOKEN is on) when we make a second search after closing popup.
30 }
31 
32 
33 // Load Dolibarr environment
34 require '../main.inc.php';
35 require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
36 require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
37 require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
38 
39 // Load translation files required by the page
40 $langs->loadLangs(array('errors', 'admin', 'modulebuilder', 'exports'));
41 
42 $mode = GETPOST('mode', 'alpha');
43 $action = GETPOST('action', 'aZ09');
44 $id = GETPOST('id', 'int');
45 if (empty($mode)) {
46  $mode = 'desc';
47 }
48 
49 if (!$user->admin) {
51 }
52 
53 
54 
55 /*
56  * Actions
57  */
58 
59 // Nothing
60 
61 
62 /*
63  * View
64  */
65 
66 $form = new Form($db);
67 
68 $help_url = 'EN:First_setup|FR:Premiers_param├ętrages|ES:Primeras_configuraciones';
69 llxHeader('', $langs->trans("Setup"), $help_url);
70 
71 print '<!-- Force style container -->'."\n".'<style>
72 .id-container {
73  width: 100%;
74 }
75 #id-right {
76  padding-left: unset;
77 }
78 </style>';
79 
80 $arrayofnatures = array('core'=>$langs->transnoentitiesnoconv("Core"), 'external'=>$langs->transnoentitiesnoconv("External").' - '.$langs->trans("AllPublishers"));
81 
82 // Search modules dirs
83 $modulesdir = dolGetModulesDirs();
84 
85 
86 $filename = array();
87 $modules = array();
88 $orders = array();
89 $categ = array();
90 $dirmod = array();
91 $i = 0; // is a sequencer of modules found
92 $j = 0; // j is module number. Automatically affected if module number not defined.
93 $modNameLoaded = array();
94 
95 foreach ($modulesdir as $dir) {
96  // Load modules attributes in arrays (name, numero, orders) from dir directory
97  //print $dir."\n<br>";
98  dol_syslog("Scan directory ".$dir." for module descriptor files (modXXX.class.php)");
99  $handle = @opendir($dir);
100  if (is_resource($handle)) {
101  while (($file = readdir($handle)) !== false) {
102  //print "$i ".$file."\n<br>";
103  if (is_readable($dir.$file) && substr($file, 0, 3) == 'mod' && substr($file, dol_strlen($file) - 10) == '.class.php') {
104  $modName = substr($file, 0, dol_strlen($file) - 10);
105 
106  if ($modName) {
107  if (!empty($modNameLoaded[$modName])) {
108  $mesg = "Error: Module ".$modName." was found twice: Into ".$modNameLoaded[$modName]." and ".$dir.". You probably have an old file on your disk.<br>";
109  setEventMessages($mesg, null, 'warnings');
110  dol_syslog($mesg, LOG_ERR);
111  continue;
112  }
113 
114  try {
115  $res = include_once $dir.$file;
116  if (class_exists($modName)) {
117  try {
118  $objMod = new $modName($db);
119  $modNameLoaded[$modName] = $dir;
120 
121  if (!$objMod->numero > 0 && $modName != 'modUser') {
122  dol_syslog('The module descriptor '.$modName.' must have a numero property', LOG_ERR);
123  }
124  $j = $objMod->numero;
125 
126  $modulequalified = 1;
127 
128  // We discard modules according to features level (PS: if module is activated we always show it)
129  $const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i', '', get_class($objMod)));
130  if ($objMod->version == 'development' && (empty($conf->global->$const_name) && (getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2))) {
131  $modulequalified = 0;
132  }
133  if ($objMod->version == 'experimental' && (empty($conf->global->$const_name) && (getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1))) {
134  $modulequalified = 0;
135  }
136  if (preg_match('/deprecated/', $objMod->version) && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL >= 0))) {
137  $modulequalified = 0;
138  }
139 
140  // We discard modules according to property disabled
141  //if (!empty($objMod->hidden)) $modulequalified=0;
142 
143  if ($modulequalified > 0) {
144  $publisher = dol_escape_htmltag($objMod->getPublisher());
145  $external = ($objMod->isCoreOrExternalModule() == 'external');
146  if ($external) {
147  if ($publisher) {
148  $arrayofnatures['external_'.$publisher] = $langs->trans("External").' - '.$publisher;
149  } else {
150  $arrayofnatures['external_'] = $langs->trans("External").' - '.$langs->trans("UnknownPublishers");
151  }
152  }
153  ksort($arrayofnatures);
154  }
155 
156  // Define array $categ with categ with at least one qualified module
157  if ($modulequalified > 0) {
158  $modules[$i] = $objMod;
159  $filename[$i] = $modName;
160 
161  // Gives the possibility to the module, to provide his own family info and position of this family
162  if (is_array($objMod->familyinfo) && !empty($objMod->familyinfo)) {
163  if (!is_array($familyinfo)) {
164  $familyinfo = array();
165  }
166  $familyinfo = array_merge($familyinfo, $objMod->familyinfo);
167  $familykey = key($objMod->familyinfo);
168  } else {
169  $familykey = $objMod->family;
170  }
171 
172  $moduleposition = ($objMod->module_position ? $objMod->module_position : '50');
173  if ($moduleposition == '50' && ($objMod->isCoreOrExternalModule() == 'external')) {
174  $moduleposition = '80'; // External modules at end by default
175  }
176 
177  if (empty($familyinfo[$familykey]['position'])) {
178  $familyinfo[$familykey]['position'] = '0';
179  }
180 
181  $orders[$i] = $familyinfo[$familykey]['position']."_".$familykey."_".$moduleposition."_".$j; // Sort by family, then by module position then number
182  $dirmod[$i] = $dir;
183  //print $i.'-'.$dirmod[$i].'<br>';
184  // Set categ[$i]
185  $specialstring = 'unknown';
186  if ($objMod->version == 'development' || $objMod->version == 'experimental') {
187  $specialstring = 'expdev';
188  }
189  if (isset($categ[$specialstring])) {
190  $categ[$specialstring]++; // Array of all different modules categories
191  } else {
192  $categ[$specialstring] = 1;
193  }
194  $j++;
195  $i++;
196  } else {
197  dol_syslog("Module ".get_class($objMod)." not qualified");
198  }
199  } catch (Exception $e) {
200  dol_syslog("Failed to load ".$dir.$file." ".$e->getMessage(), LOG_ERR);
201  }
202  } else {
203  print "Warning bad descriptor file : ".$dir.$file." (Class ".$modName." not found into file)<br>";
204  }
205  } catch (Exception $e) {
206  dol_syslog("Failed to load ".$dir.$file." ".$e->getMessage(), LOG_ERR);
207  }
208  }
209  }
210  }
211  closedir($handle);
212  } else {
213  dol_syslog("htdocs/admin/modulehelp.php: Failed to open directory ".$dir.". See permission and open_basedir option.", LOG_WARNING);
214  }
215 }
216 
217 asort($orders);
218 //var_dump($orders);
219 //var_dump($categ);
220 //var_dump($modules);
221 
222 
223 unset($objMod);
224 $i = 0;
225 foreach ($orders as $tmpkey => $tmpvalue) {
226  $tmpMod = $modules[$tmpkey];
227  if ($tmpMod->numero == $id) {
228  $key = $i;
229  $modName = $filename[$tmpkey];
230  $dirofmodule = $dirmod[$tmpkey];
231  $objMod = $tmpMod;
232  break;
233  }
234  $i++;
235 }
236 $value = $orders[$key];
237 $tab = explode('_', $value);
238 $familyposition = $tab[0]; $familykey = $tab[1]; $module_position = $tab[2]; $numero = $tab[3];
239 
240 
241 
242 $head = modulehelp_prepare_head($objMod);
243 
244 // Check filters
245 $modulename = $objMod->getName();
246 $moduledesc = $objMod->getDesc();
247 $moduleauthor = $objMod->getPublisher();
248 $moduledir = strtolower(preg_replace('/^mod/i', '', get_class($objMod)));
249 
250 $const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i', '', get_class($objMod)));
251 
252 $text = '<span class="opacitymedium">'.$langs->trans("LastActivationDate").':</span> ';
253 if (!empty($conf->global->$const_name)) {
254  $text .= dol_print_date($objMod->getLastActivationDate(), 'dayhour');
255 } else {
256  $text .= $langs->trans("Disabled");
257 }
258 $tmp = $objMod->getLastActivationInfo();
259 $authorid = (empty($tmp['authorid']) ? '' : $tmp['authorid']);
260 if ($authorid > 0) {
261  $tmpuser = new User($db);
262  $tmpuser->fetch($authorid);
263  $text .= '<br><span class="opacitymedium">'.$langs->trans("LastActivationAuthor").':</span> ';
264  $text .= $tmpuser->getNomUrl(1);
265 }
266 $ip = (empty($tmp['ip']) ? '' : $tmp['ip']);
267 if ($ip) {
268  $text .= '<br><span class="opacitymedium">'.$langs->trans("LastActivationIP").':</span> ';
269  $text .= $ip;
270 }
271 $lastactivationversion = (empty($tmp['lastactivationversion']) ? '' : $tmp['lastactivationversion']);
272 if ($lastactivationversion) {
273  $text .= '<br><span class="opacitymedium">'.$langs->trans("LastActivationVersion").':</span> ';
274  $text .= $lastactivationversion;
275 }
276 
277 $moreinfo = $text;
278 
279 $title = ($modulename ? $modulename : $moduledesc);
280 
281 print '<div class="centpercent">';
282 
283 $picto = 'object_'.$objMod->picto;
284 
285 print load_fiche_titre(($modulename ? $modulename : $moduledesc), $moreinfo, $picto, 0, '', 'titlemodulehelp');
286 print '<br>';
287 
288 print dol_get_fiche_head($head, $mode, '', -1);
289 
290 if (!$modulename) {
291  dol_syslog("Error for module ".$key." - Property name of module looks empty", LOG_WARNING);
292 }
293 
294 // Load all lang files of module
295 if (isset($objMod->langfiles) && is_array($objMod->langfiles)) {
296  foreach ($objMod->langfiles as $domain) {
297  $langs->load($domain);
298  }
299 }
300 
301 
302 
303 
304 // Version (with picto warning or not)
305 $version = $objMod->getVersion(0);
306 $versiontrans = '';
307 if (preg_match('/development/i', $version)) {
308  $versiontrans .= img_warning($langs->trans("Development"), 'style="float: left"');
309 }
310 if (preg_match('/experimental/i', $version)) {
311  $versiontrans .= img_warning($langs->trans("Experimental"), 'style="float: left"');
312 }
313 if (preg_match('/deprecated/i', $version)) {
314  $versiontrans .= img_warning($langs->trans("Deprecated"), 'style="float: left"');
315 }
316 $versiontrans .= $objMod->getVersion(1);
317 
318 // Define imginfo
319 $imginfo = "info";
320 if ($objMod->isCoreOrExternalModule() == 'external') {
321  $imginfo = "info_black";
322 }
323 
324 // Define text of description of module
325 $text = '';
326 
327 if ($mode == 'desc') {
328  if ($moduledesc) {
329  $text .= '<br>'.$moduledesc.'<br><br><br>';
330  }
331 
332  $text .= '<span class="opacitymedium">'.$langs->trans("Version").':</span> '.$version;
333 
334  $moduledescriptorfile = get_class($objMod).'.class.php';
335  $text .= '<br><span class="opacitymedium">'.$langs->trans("DescriptorFile").':</span> '.$moduledescriptorfile;
336 
337  $textexternal = '';
338  if ($objMod->isCoreOrExternalModule() == 'external') {
339  $tmpdirofmoduletoshow = preg_replace('/^'.preg_quote(DOL_DOCUMENT_ROOT, '/').'/', '', $dirofmodule);
340  $textexternal .= '<br><span class="opacitymedium">'.$langs->trans("Origin").':</span> '.$langs->trans("ExternalModule").' - '.$langs->trans("InstalledInto", $tmpdirofmoduletoshow);
341 
342  global $dolibarr_allow_download_external_modules;
343  if (!empty($dolibarr_allow_download_external_modules) && preg_match('/\/custom\//', $dirofmodule)) {
344  // Add a link to download a zip of the module
345  $textexternal .= ' <a href="'.DOL_URL_ROOT.'/admin/tools/export_files.php?export_type=externalmodule&what='.urlencode($moduledir).'&compression=zip&zipfilename_template=module_'.$moduledir.'-'.$version.'.notorig" target="_blank" rel="noopener">'.img_picto('', 'download').'</a>';
346  }
347 
348  if ($objMod->editor_name != 'dolibarr') {
349  $textexternal .= '<br><span class="opacitymedium">'.$langs->trans("Publisher").':</span> '.(empty($objMod->editor_name) ? $langs->trans("Unknown") : $objMod->editor_name);
350  }
351  $editor_url = $objMod->editor_url;
352  if (!preg_match('/^http/', $editor_url)) {
353  $editor_url = 'http://'.$editor_url;
354  }
355  if (!empty($objMod->editor_url) && !preg_match('/dolibarr\.org/i', $objMod->editor_url)) {
356  $textexternal .= ($objMod->editor_name != 'dolibarr' ? ' - ' : '').img_picto('', 'globe').' <a href="'.$editor_url.'" target="_blank" rel="noopener noreferrer external">'.$objMod->editor_url.'</a>';
357  }
358  $text .= $textexternal;
359  $text .= '<br>';
360  } else {
361  $text .= '<br><span class="opacitymedium">'.$langs->trans("Origin").':</span> '.$langs->trans("Core").'<br>';
362  }
363 
364  $moduledesclong = $objMod->getDescLong();
365  if ($moduledesclong) {
366  $text .= '<br><hr><div class="moduledesclong">'.$moduledesclong.'<div>';
367  }
368 }
369 
370 if ($mode == 'feature') {
371  $text .= '<br><strong>'.$langs->trans("DependsOn").':</strong> ';
372  if (is_array($objMod->depends) && count($objMod->depends)) {
373  $i = 0;
374  foreach ($objMod->depends as $modulestringorarray) {
375  if (is_array($modulestringorarray)) {
376  $text .= ($i ? ', ' : '').join(', ', $modulestringorarray);
377  } else {
378  $text .= ($i ? ', ' : '').$modulestringorarray;
379  }
380  $i++;
381  }
382  } else {
383  $text .= '<span class="opacitymedium">'.$langs->trans("None").'</span>';
384  }
385  $text .= '<br>';
386 
387  $text .= '<br><strong>'.$langs->trans("RequiredBy").':</strong> ';
388  if (is_array($objMod->requiredby) && count($objMod->requiredby)) {
389  $i = 0;
390  foreach ($objMod->requiredby as $modulestringorarray) {
391  if (is_array($modulestringorarray)) {
392  $text .= ($i ? ', ' : '').join(', ', $modulestringorarray);
393  } else {
394  $text .= ($i ? ', ' : '').$modulestringorarray;
395  }
396  $i++;
397  }
398  } else {
399  $text .= '<span class="opacitymedium">'.$langs->trans("None").'</span>';
400  }
401 
402  $text .= '<br><br>';
403 
404  $text .= '<br><strong>'.$langs->trans("AddDataTables").':</strong> ';
405  $listofsqlfiles1 = dol_dir_list(DOL_DOCUMENT_ROOT.'/install/mysql/tables/', 'files', 0, 'llx.*-'.$moduledir.'\.sql', array('\.key\.sql', '\.sql\.back'));
406  $listofsqlfiles2 = dol_dir_list(dol_buildpath($moduledir.'/sql/'), 'files', 0, 'llx.*\.sql', array('\.key\.sql', '\.sql\.back'));
407  $sqlfiles = array_merge($listofsqlfiles1, $listofsqlfiles2);
408 
409  if (count($sqlfiles) > 0) {
410  $i = 0;
411  foreach ($sqlfiles as $val) {
412  $text .= ($i ? ', ' : '').preg_replace('/\-'.$moduledir.'$/', '', preg_replace('/\.sql$/', '', preg_replace('/llx_/', '', $val['name'])));
413  $i++;
414  }
415  } else {
416  $text .= '<span class="opacitymedium">'.$langs->trans("No").'</span>';
417  }
418 
419  $text .= '<br>';
420 
421  $text .= '<br><strong>'.$langs->trans("AddDictionaries").':</strong> ';
422  if (isset($objMod->dictionaries) && isset($objMod->dictionaries['tablib']) && is_array($objMod->dictionaries['tablib']) && count($objMod->dictionaries['tablib'])) {
423  $i = 0;
424  foreach ($objMod->dictionaries['tablib'] as $val) {
425  $text .= ($i ? ', ' : '').$val;
426  $i++;
427  }
428  } else {
429  $text .= '<span class="opacitymedium">'.$langs->trans("No").'</span>';
430  }
431 
432  $text .= '<br>';
433 
434  $text .= '<br><strong>'.$langs->trans("AddData").':</strong> ';
435  $filedata = dol_buildpath($moduledir.'/sql/data.sql');
436  if (dol_is_file($filedata)) {
437  $text .= $langs->trans("Yes").' <span class="opacitymedium">('.$moduledir.'/sql/data.sql)</span>';
438  } else {
439  $text .= '<span class="opacitymedium">'.$langs->trans("No").'</span>';
440  }
441 
442  $text .= '<br>';
443 
444  $text .= '<br><strong>'.$langs->trans("AddRemoveTabs").':</strong> ';
445  if (isset($objMod->tabs) && is_array($objMod->tabs) && count($objMod->tabs)) {
446  $i = 0;
447  foreach ($objMod->tabs as $val) {
448  if (is_array($val)) {
449  $val = $val['data'];
450  }
451  if (is_string($val)) {
452  $tmp = explode(':', $val, 3);
453  $text .= ($i ? ', ' : '').$tmp[0].':'.$tmp[1];
454  $i++;
455  }
456  }
457  } else {
458  $text .= '<span class="opacitymedium">'.$langs->trans("No").'</span>';
459  }
460 
461  $text .= '<br>';
462 
463  $text .= '<br><strong>'.$langs->trans("AddModels").':</strong> ';
464  if (isset($objMod->module_parts) && isset($objMod->module_parts['models']) && $objMod->module_parts['models']) {
465  $text .= $langs->trans("Yes");
466  } else {
467  $text .= '<span class="opacitymedium">'.$langs->trans("No").'</span>';
468  }
469 
470  $text .= '<br>';
471 
472  $text .= '<br><strong>'.$langs->trans("AddSubstitutions").':</strong> ';
473  if (isset($objMod->module_parts) && isset($objMod->module_parts['substitutions']) && $objMod->module_parts['substitutions']) {
474  $text .= $langs->trans("Yes");
475  } else {
476  $text .= '<span class="opacitymedium">'.$langs->trans("No").'</span>';
477  }
478 
479  $text .= '<br>';
480 
481  $text .= '<br><strong>'.$langs->trans("AddSheduledJobs").':</strong> ';
482  if (isset($objMod->cronjobs) && is_array($objMod->cronjobs) && count($objMod->cronjobs)) {
483  $i = 0;
484  foreach ($objMod->cronjobs as $val) {
485  $text .= ($i ? ', ' : '').($val['label']);
486  $i++;
487  }
488  } else {
489  $text .= '<span class="opacitymedium">'.$langs->trans("No").'</span>';
490  }
491 
492  $text .= '<br>';
493 
494  $text .= '<br><strong>'.$langs->trans("AddTriggers").':</strong> ';
495  $moreinfoontriggerfile = '';
496  if (isset($objMod->module_parts) && isset($objMod->module_parts['triggers']) && $objMod->module_parts['triggers']) {
497  $yesno = 'Yes';
498  } else {
499  $yesno = '<span class="opacitymedium">No</span>';
500  }
501  require_once DOL_DOCUMENT_ROOT.'/core/class/interfaces.class.php';
502  $interfaces = new Interfaces($db);
503  $triggers = $interfaces->getTriggersList(array((($objMod->isCoreOrExternalModule() == 'external') ? '/'.$moduledir : '').'/core/triggers'));
504  foreach ($triggers as $triggercursor) {
505  if ($triggercursor['module'] == $moduledir) {
506  $yesno = 'Yes';
507  $moreinfoontriggerfile = ' ('.$triggercursor['relpath'].')';
508  }
509  }
510 
511  $text .= $langs->trans($yesno).$moreinfoontriggerfile;
512 
513  $text .= '<br>';
514 
515  $text .= '<br><strong>'.$langs->trans("AddBoxes").':</strong> ';
516  if (isset($objMod->boxes) && is_array($objMod->boxes) && count($objMod->boxes)) {
517  $i = 0;
518  foreach ($objMod->boxes as $val) {
519  $boxstring = (empty($val['file']) ? (empty($val[0]) ? '' : $val[0]) : $val['file']);
520  if ($boxstring) {
521  $text .= ($i ? ', ' : '').$boxstring;
522  }
523  $i++;
524  }
525  } else {
526  $text .= '<span class="opacitymedium">'.$langs->trans("No").'</span>';
527  }
528 
529  $text .= '<br>';
530 
531  $text .= '<br><strong>'.$langs->trans("AddHooks").':</strong> ';
532  if (isset($objMod->module_parts) && isset($objMod->module_parts['hooks']) && is_array($objMod->module_parts['hooks']) && count($objMod->module_parts['hooks'])) {
533  $i = 0;
534  foreach ($objMod->module_parts['hooks'] as $key => $val) {
535  if ($key === 'entity') {
536  continue;
537  }
538 
539  // For special values
540  if ($key === 'data') {
541  if (is_array($val)) {
542  foreach ($val as $value) {
543  $text .= ($i ? ', ' : '').($value);
544  $i++;
545  }
546 
547  continue;
548  }
549  }
550 
551  $text .= ($i ? ', ' : '').($val);
552  $i++;
553  }
554  } else {
555  $text .= '<span class="opacitymedium">'.$langs->trans("No").'</span>';
556  }
557 
558  $text .= '<br>';
559 
560  $text .= '<br><strong>'.$langs->trans("AddPermissions").':</strong> ';
561  if (isset($objMod->rights) && is_array($objMod->rights) && count($objMod->rights)) {
562  $i = 0;
563  foreach ($objMod->rights as $val) {
564  $text .= ($i ? ', ' : '').($val[1]);
565  $i++;
566  }
567  } else {
568  $text .= '<span class="opacitymedium">'.$langs->trans("No").'</span>';
569  }
570 
571  $text .= '<br>';
572 
573  $text .= '<br><strong>'.$langs->trans("AddMenus").':</strong> ';
574  if (isset($objMod->menu) && !empty($objMod->menu)) { // objMod can be an array or just an int 1
575  $text .= $langs->trans("Yes");
576  } else {
577  $text .= '<span class="opacitymedium">'.$langs->trans("No").'</span>';
578  }
579 
580  $text .= '<br>';
581 
582  $text .= '<br><strong>'.$langs->trans("AddExportProfiles").':</strong> ';
583  if (isset($objMod->export_label) && is_array($objMod->export_label) && count($objMod->export_label)) {
584  $i = 0;
585  foreach ($objMod->export_label as $val) {
586  $text .= ($i ? ', ' : '').($val);
587  $i++;
588  }
589  } else {
590  $text .= '<span class="opacitymedium">'.$langs->trans("No").'</span>';
591  }
592 
593  $text .= '<br>';
594 
595  $text .= '<br><strong>'.$langs->trans("AddImportProfiles").':</strong> ';
596  if (isset($objMod->import_label) && is_array($objMod->import_label) && count($objMod->import_label)) {
597  $i = 0;
598  foreach ($objMod->import_label as $val) {
599  $text .= ($i ? ', ' : '').($val);
600  $i++;
601  }
602  } else {
603  $text .= '<span class="opacitymedium">'.$langs->trans("No").'</span>';
604  }
605 
606  $text .= '<br>';
607 
608  $text .= '<br><strong>'.$langs->trans("AddOtherPagesOrServices").':</strong> ';
609  $text .= '<span class="opacitymedium">'.$langs->trans("DetectionNotPossible").'</span>';
610 }
611 
612 
613 if ($mode == 'changelog') {
614  $changelog = $objMod->getChangeLog();
615  if ($changelog) {
616  $text .= '<div class="moduledesclong">'.$changelog.'<div>';
617  } else {
618  $text .= '<div class="moduledesclong"><span class="opacitymedium">'.$langs->trans("NotAvailable").'</span></div>';
619  }
620 }
621 
622 print $text;
623 
624 
625 print dol_get_fiche_end();
626 
627 print '</div>';
628 
629 // End of page
630 llxFooter();
631 $db->close();
llxFooter
llxFooter()
Empty footer.
Definition: wrapper.php:70
dol_escape_htmltag
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
Definition: functions.lib.php:1600
load_fiche_titre
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
Definition: functions.lib.php:5477
GETPOST
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Definition: functions.lib.php:609
dol_buildpath
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
Definition: functions.lib.php:1158
dol_dir_list
dol_dir_list($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:62
img_warning
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
Definition: functions.lib.php:4784
$form
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
Definition: card.php:143
Interfaces
Class to manage triggers.
Definition: interfaces.class.php:32
dol_is_file
dol_is_file($pathoffile)
Return if path is a file.
Definition: files.lib.php:483
$help_url
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save" &&empty($cancel)) $help_url
View.
Definition: agenda.php:118
dol_print_date
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
Definition: functions.lib.php:2675
img_picto
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
Definition: functions.lib.php:4135
llxHeader
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Definition: wrapper.php:56
Exception
dol_syslog
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
Definition: functions.lib.php:1741
setEventMessages
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
Definition: functions.lib.php:8673
dol_strlen
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
Definition: functions.lib.php:3997
dol_get_fiche_end
dol_get_fiche_end($notab=0)
Return tab footer of a card.
Definition: functions.lib.php:2177
dolGetModulesDirs
dolGetModulesDirs($subdir='')
Return list of modules directories.
Definition: functions2.lib.php:80
dol_get_fiche_head
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
Definition: functions.lib.php:1979
User
Class to manage Dolibarr users.
Definition: user.class.php:47
modulehelp_prepare_head
modulehelp_prepare_head($object)
Prepare array with list of tabs.
Definition: admin.lib.php:875
Form
Class to manage generation of HTML components Only common components must be here.
Definition: html.form.class.php:53
accessforbidden
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.
Definition: security.lib.php:1169
getDolGlobalInt
getDolGlobalInt($key, $default=0)
Return dolibarr global constant int value.
Definition: functions.lib.php:156