diff --git a/htdocs/api/index.php b/htdocs/api/index.php
index afb0289aa32..8543e284533 100644
--- a/htdocs/api/index.php
+++ b/htdocs/api/index.php
@@ -257,6 +257,8 @@ if (!empty($reg[1]) && $reg[1] == 'explorer' && ($reg[2] == '/swagger.json' || $
continue;
}
+ //dol_syslog("We scan to search api file with into ".$dir_part.$file_searched);
+
$regapi = array();
if (is_readable($dir_part.$file_searched) && preg_match("/^api_(.*)\.class\.php$/i", $file_searched, $regapi)) {
$classname = ucwords($regapi[1]);
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 381280289ee..51d26491826 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -3887,15 +3887,18 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
if (strpos($pictowithouttext, 'fontawesome_') !== false || preg_match('/^fa-/', $pictowithouttext)) {
// This is a font awesome image 'fonwtawesome_xxx' or 'fa-xxx'
+ $pictowithouttext = str_replace('fontawesome_', '', $pictowithouttext);
$pictowithouttext = str_replace('fa-', '', $pictowithouttext);
+
$pictowithouttextarray = explode('_', $pictowithouttext);
$marginleftonlyshort = 0;
if (!empty($pictowithouttextarray[1])) {
- $fakey = 'fa-'.$pictowithouttextarray[1];
- $fa = empty($pictowithouttextarray[2]) ? 'fa' : $pictowithouttextarray[2];
- $facolor = empty($pictowithouttextarray[3]) ? '' : $pictowithouttextarray[3];
- $fasize = empty($pictowithouttextarray[4]) ? '' : $pictowithouttextarray[4];
+ // Syntax is 'fontawesome_fakey_faprefix_facolor_fasize' or 'fa-fakey_faprefix_facolor_fasize'
+ $fakey = 'fa-'.$pictowithouttextarray[0];
+ $fa = empty($pictowithouttextarray[1]) ? 'fa' : $pictowithouttextarray[1];
+ $facolor = empty($pictowithouttextarray[2]) ? '' : $pictowithouttextarray[2];
+ $fasize = empty($pictowithouttextarray[3]) ? '' : $pictowithouttextarray[3];
} else {
$fakey = 'fa-'.$pictowithouttext;
$fa = 'fa';
diff --git a/htdocs/modulebuilder/admin/setup.php b/htdocs/modulebuilder/admin/setup.php
index da2cff7eff4..50c86e38cc0 100644
--- a/htdocs/modulebuilder/admin/setup.php
+++ b/htdocs/modulebuilder/admin/setup.php
@@ -111,7 +111,7 @@ print '
';
print '
| '.$langs->trans("Key").' | '; +print ''.$langs->trans("Parameter").' | '; print ''.$langs->trans("Value").' | '; print "
| '.$langs->trans("UseSpecificEditorName").' | '; + print ''.$langs->trans("UseSpecificEditorName").' | '; print ''; print ''; print ' | '; print '
| '.$langs->trans("UseSpecificEditorURL").' | '; + print ''.$langs->trans("UseSpecificEditorURL").' | '; print ''; print ''; print ' | '; print '
| '.$langs->trans("UseSpecificFamily").' | '; + print ''.$langs->trans("UseSpecificFamily").' | '; print ''; print ''; print ' | '; print '
| '.$langs->trans("UseSpecificAuthor").' | '; + print ''.$langs->trans("UseSpecificAuthor").' | '; print ''; print ''; print ' | '; print '
| '.$langs->trans("UseSpecificVersion").' | '; + print ''.$langs->trans("UseSpecificVersion").' | '; print ''; print ''; print ' | '; @@ -170,14 +170,14 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { } print '
| '.$langs->trans("UseSpecificReadme").' | '; +print ''.$langs->trans("UseSpecificReadme").' | '; print ''; print ''; print ' | '; print '
| '.$langs->trans("AsciiToHtmlConverter").' | '; +print ''.$langs->trans("AsciiToHtmlConverter").' | '; print ''; print ''; print ' '.$langs->trans("Example").': asciidoc, asciidoctor'; @@ -185,7 +185,7 @@ print ' | '; print '
| '.$langs->trans("AsciiToPdfConverter").' | '; +print ''.$langs->trans("AsciiToPdfConverter").' | '; print '';
print '';
print ' '.$langs->trans("Example").': asciidoctor-pdf';
diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php
index c6dec95481c..3283d7c7666 100644
--- a/htdocs/modulebuilder/index.php
+++ b/htdocs/modulebuilder/index.php
@@ -343,10 +343,10 @@ if ($dirins && $action == 'initmodule' && $modulename) {
'---Put here your own copyright and developer email---'=>dol_print_date($now, '%Y').' '.$user->getFullName($langs).($user->email ? ' <'.$user->email.'>' : ''),
'Editor name'=>$editorname,
'https://www.example.com'=>$editorurl,
- '1.0'=>$version,
- 'idpicto'=>(empty($picto)) ? 'generic' : $picto,
+ '$this->version = \'1.0\''=>'$this->version = \''.$version.'\'',
+ '$this->picto = \'generic\';'=>(empty($picto)) ? '$this->picto = \'generic\'' : '$this->picto = \''.$picto.'\';',
"modulefamily" =>$family,
- 500000=>$idmodule
+ '500000'=>$idmodule
);
if (!empty($conf->global->MODULEBUILDER_SPECIFIC_EDITOR_NAME)) {
@@ -382,7 +382,6 @@ if ($dirins && $action == 'initmodule' && $modulename) {
if (!$error) {
setEventMessages('ModuleInitialized', null);
$module = $modulename;
- $modulename = '';
clearstatcache(true);
if (function_exists('opcache_invalidate')) {
@@ -2115,8 +2114,8 @@ if ($module == 'initmodule') {
print '';
print ' '; print ajax_combobox("family"); - print ''.$langs->trans("Picto").' '; - print $form->textwithpicto('', $langs->trans("Example").': generic, globe, ... any font awesome code'); + print ''.$langs->trans("Picto").' '; + print $form->textwithpicto('', $langs->trans("Example").': fa-generic, fa-globe, ... any font awesome code. Advanced syntax is fa-fakey[_faprefix[_facolor[_fasize]]]'); print ' '; print ''.$langs->trans("Description").' '; @@ -2269,7 +2268,7 @@ if ($module == 'initmodule') { print ' |