diff --git a/htdocs/admin/menus/edit.php b/htdocs/admin/menus/edit.php index 288cba1c5b9..0bbdc36f548 100644 --- a/htdocs/admin/menus/edit.php +++ b/htdocs/admin/menus/edit.php @@ -71,65 +71,6 @@ if (GETPOST("menu_handler")) { * Actions */ -if ($action == 'update') { - if (!$cancel) { - $leftmenu = ''; $mainmenu = ''; - if (GETPOST('menuIdParent', 'alphanohtml') && !is_numeric(GETPOST('menuIdParent', 'alphanohtml'))) { - $tmp = explode('&', GETPOST('menuIdParent', 'alphanohtml')); - foreach ($tmp as $s) { - if (preg_match('/fk_mainmenu=/', $s)) { - $mainmenu = preg_replace('/fk_mainmenu=/', '', $s); - } - if (preg_match('/fk_leftmenu=/', $s)) { - $leftmenu = preg_replace('/fk_leftmenu=/', '', $s); - } - } - } - - $menu = new Menubase($db); - $result = $menu->fetch(GETPOST('menuId', 'int')); - if ($result > 0) { - $menu->title = (string) GETPOST('titre', 'alphanohtml'); - $menu->leftmenu = (string) GETPOST('leftmenu', 'aZ09'); - $menu->url = (string) GETPOST('url', 'alphanohtml'); - $menu->langs = (string) GETPOST('langs', 'alphanohtml'); - $menu->position = (int) GETPOST('position', 'int'); - $menu->enabled = (string) GETPOST('enabled', 'alphanohtml'); - $menu->perms = (string) GETPOST('perms', 'alphanohtml'); - $menu->target = (string) GETPOST('target', 'alphanohtml'); - $menu->user = (string) GETPOST('user', 'alphanohtml'); - $menu->mainmenu = (string) GETPOST('propertymainmenu', 'alphanohtml'); - if (is_numeric(GETPOST('menuIdParent', 'alphanohtml'))) { - $menu->fk_menu = (int) GETPOST('menuIdParent', 'alphanohtml'); - } else { - if (GETPOST('type', 'alphanohtml') == 'top') { - $menu->fk_menu = 0; - } else { - $menu->fk_menu = -1; - } - $menu->fk_mainmenu = $mainmenu; - $menu->fk_leftmenu = $leftmenu; - } - - $result = $menu->update($user); - if ($result > 0) { - setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs'); - } else { - setEventMessages($menu->error, $menu->errors, 'errors'); - } - } else { - setEventMessages($menu->error, $menu->errors, 'errors'); - } - $action = "edit"; - - header("Location: ".DOL_URL_ROOT."/admin/menus/index.php?menu_handler=".$menu_handler); - exit; - } else { - header("Location: ".DOL_URL_ROOT."/admin/menus/index.php?menu_handler=".$menu_handler); - exit; - } -} - if ($action == 'add') { if ($cancel) { header("Location: ".DOL_URL_ROOT."/admin/menus/index.php?menu_handler=".$menu_handler); @@ -138,8 +79,8 @@ if ($action == 'add') { $leftmenu = ''; $mainmenu = ''; - if (GETPOST('menuId', 'alphanohtml', 3) && !is_numeric(GETPOST('menuId', 'alphanohtml', 3))) { - $tmp = explode('&', GETPOST('menuId', 'alphanohtml', 3)); + if (GETPOST('menuIdParent', 'alphanohtml') && !is_numeric(GETPOST('menuIdParent', 'alphanohtml'))) { + $tmp = explode('&', GETPOST('menuIdParent', 'alphanohtml')); foreach ($tmp as $s) { if (preg_match('/fk_mainmenu=/', $s)) { $mainmenu = preg_replace('/fk_mainmenu=/', '', $s); @@ -173,12 +114,12 @@ if ($action == 'add') { $action = 'create'; $error++; } - if (!$error && GETPOST('menuId', 'alphanohtml', 3) && GETPOST('type') == 'top') { + if (!$error && GETPOST('menuIdParent', 'alphanohtml') && GETPOST('type') == 'top') { setEventMessages($langs->trans("ErrorTopMenuMustHaveAParentWithId0"), null, 'errors'); $action = 'create'; $error++; } - if (!$error && !GETPOST('menuId', 'alphanohtml', 3) && GETPOST('type') == 'left') { + if (!$error && !GETPOST('menuIdParent', 'alphanohtml') && GETPOST('type') == 'left') { setEventMessages($langs->trans("ErrorLeftMenuMustHaveAParentId"), null, 'errors'); $action = 'create'; $error++; @@ -189,6 +130,7 @@ if ($action == 'add') { $menu->menu_handler = preg_replace('/_menu$/', '', GETPOST('menu_handler', 'aZ09')); $menu->type = (string) GETPOST('type', 'alphanohtml'); $menu->title = (string) GETPOST('titre', 'alphanohtml'); + $menu->prefix = (string) GETPOST('picto', 'restricthtmlallowclass'); $menu->url = (string) GETPOST('url', 'alphanohtml'); $menu->langs = (string) GETPOST('langs', 'alphanohtml'); $menu->position = (int) GETPOST('position', 'int'); @@ -197,8 +139,8 @@ if ($action == 'add') { $menu->target = (string) GETPOST('target', 'alphanohtml'); $menu->user = (string) GETPOST('user', 'alphanohtml'); $menu->mainmenu = (string) GETPOST('propertymainmenu', 'alphanohtml'); - if (is_numeric(GETPOST('menuId', 'alphanohtml', 3))) { - $menu->fk_menu = (int) GETPOST('menuId', 'alphanohtml', 3); + if (is_numeric(GETPOST('menuIdParent', 'alphanohtml'))) { + $menu->fk_menu = (int) GETPOST('menuIdParent', 'alphanohtml'); } else { if (GETPOST('type', 'alphanohtml') == 'top') { $menu->fk_menu = 0; @@ -220,6 +162,78 @@ if ($action == 'add') { } } +if ($action == 'update') { + if (!$cancel) { + $leftmenu = ''; $mainmenu = ''; + if (GETPOST('menuIdParent', 'alphanohtml') && !is_numeric(GETPOST('menuIdParent', 'alphanohtml'))) { + $tmp = explode('&', GETPOST('menuIdParent', 'alphanohtml')); + foreach ($tmp as $s) { + if (preg_match('/fk_mainmenu=/', $s)) { + $mainmenu = preg_replace('/fk_mainmenu=/', '', $s); + } + if (preg_match('/fk_leftmenu=/', $s)) { + $leftmenu = preg_replace('/fk_leftmenu=/', '', $s); + } + } + } + + $error = 0; + if (!$error && !GETPOST('url')) { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("URL")), null, 'errors'); + $action = 'create'; + $error++; + } + + if (!$error) { + $menu = new Menubase($db); + $result = $menu->fetch(GETPOST('menuId', 'int')); + if ($result > 0) { + $menu->title = (string) GETPOST('titre', 'alphanohtml'); + $menu->prefix = (string) GETPOST('picto', 'restricthtmlallowclass'); + $menu->leftmenu = (string) GETPOST('leftmenu', 'aZ09'); + $menu->url = (string) GETPOST('url', 'alphanohtml'); + $menu->langs = (string) GETPOST('langs', 'alphanohtml'); + $menu->position = (int) GETPOST('position', 'int'); + $menu->enabled = (string) GETPOST('enabled', 'alphanohtml'); + $menu->perms = (string) GETPOST('perms', 'alphanohtml'); + $menu->target = (string) GETPOST('target', 'alphanohtml'); + $menu->user = (string) GETPOST('user', 'alphanohtml'); + $menu->mainmenu = (string) GETPOST('propertymainmenu', 'alphanohtml'); + if (is_numeric(GETPOST('menuIdParent', 'alphanohtml'))) { + $menu->fk_menu = (int) GETPOST('menuIdParent', 'alphanohtml'); + } else { + if (GETPOST('type', 'alphanohtml') == 'top') { + $menu->fk_menu = 0; + } else { + $menu->fk_menu = -1; + } + $menu->fk_mainmenu = $mainmenu; + $menu->fk_leftmenu = $leftmenu; + } + + $result = $menu->update($user); + if ($result > 0) { + setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs'); + } else { + setEventMessages($menu->error, $menu->errors, 'errors'); + } + } else { + setEventMessages($menu->error, $menu->errors, 'errors'); + } + + $action = "edit"; + + header("Location: ".DOL_URL_ROOT."/admin/menus/index.php?menu_handler=".$menu_handler); + exit; + } else { + $action = 'edit'; + } + } else { + header("Location: ".DOL_URL_ROOT."/admin/menus/index.php?menu_handler=".$menu_handler); + exit; + } +} + /* @@ -239,14 +253,14 @@ if ($action == 'create') { { if (jQuery("#topleft").val() == \'top\') { - jQuery("#menuId").prop("disabled", true); - jQuery("#menuId").val(\'\'); + jQuery("#menuIdParent").prop("disabled", true); + jQuery("#menuIdParent").val(\'\'); jQuery("#propertymainmenu").removeAttr("disabled"); jQuery("#propertymainmenu").val(\'\'); } if (jQuery("#topleft").val() == \'left\') { - jQuery("#menuId").removeAttr("disabled"); + jQuery("#menuIdParent").removeAttr("disabled"); jQuery("#propertymainmenu").prop("disabled", true); } } @@ -264,6 +278,7 @@ if ($action == 'create') { print dol_get_fiche_head(); + print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table print ''; // Id @@ -274,7 +289,9 @@ if ($action == 'create') { $parent_level = ''; if (GETPOST('menuId', 'int')) { - $sql = "SELECT m.rowid, m.mainmenu, m.leftmenu, m.level, m.langs FROM ".MAIN_DB_PREFIX."menu as m WHERE m.rowid = ".GETPOST('menuId', 'int'); + $sql = "SELECT m.rowid, m.mainmenu, m.leftmenu, m.level, m.langs"; + $sql .= " FROM ".MAIN_DB_PREFIX."menu as m"; + $sql .= " WHERE m.rowid = ".((int) GETPOST('menuId', 'int')); $res = $db->query($sql); if ($res) { while ($menu = $db->fetch_array($res)) { @@ -330,9 +347,9 @@ if ($action == 'create') { // MenuId Parent print ''; if ($parent_rowid) { - print ''; + print ''; } else { - print ''; + print ''; } print ''; print ''; + // Picto + print ''; + print ''; + // URL print ''; - print ''; + print ''; // Langs print ''; - print ''; + print ''; // Position print ''; - print ''; + print ''; // Enabled print ''; @@ -371,6 +392,7 @@ if ($action == 'create') { print ''; print '
'.$langs->trans('MenuIdParent').''.$parent_rowid.''.$parent_rowid.''.$langs->trans('DetailMenuIdParent'); print ', '.$langs->trans("Example").': fk_mainmenu=abc&fk_leftmenu=def'; @@ -342,17 +359,21 @@ if ($action == 'create') { print '
'.$langs->trans('Title').''.$langs->trans('DetailTitre').'
'.$langs->trans('Image').''.$langs->trans('Example').': fa-global
'.$langs->trans('URL').''.$langs->trans('DetailUrl').'
'.$langs->trans('DetailUrl').'
'.$langs->trans('LangFile').''.$langs->trans('DetailLangs').'
'.$langs->trans('DetailLangs').'
'.$langs->trans('Position').''.$langs->trans('DetailPosition').'
'.$langs->trans('DetailPosition').'
'.$langs->trans('Enabled').''.$langs->trans('DetailTarget').'
'; + print '
'; print dol_get_fiche_end(); @@ -381,13 +403,15 @@ if ($action == 'create') { print load_fiche_titre($langs->trans("ModifMenu"), '', 'title_setup'); print '
'; - print '
'; + print ''; + print ''; print ''; print ''; print ''; print dol_get_fiche_head(); + print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table print ''; $menu = new Menubase($db); @@ -431,7 +455,7 @@ if ($action == 'create') { } else {*/ - print ''; + print ''; //} print ''; + print ''; print ''; @@ -460,9 +484,13 @@ if ($action == 'create') { print ''; print ''; - // Url + // URL print ''; - print ''; + print ''; + + // Picto + print ''; + print ''; // Langs print ''; @@ -470,7 +498,7 @@ if ($action == 'create') { // Position print ''; - print ''; + print ''; // Enabled print ''; @@ -489,7 +517,8 @@ if ($action == 'create') { print ''; // Target - print ''; print '
mainmenu).'">mainmenu).'">'; print $langs->trans("Example").': mytopmenukey'; @@ -448,7 +472,7 @@ if ($action == 'create') { if ($menu->fk_leftmenu) { $valtouse .= '&fk_leftmenu='.$menu->fk_leftmenu; } - print ''.$langs->trans('DetailMenuIdParent'); print ', '.$langs->trans("Example").': fk_mainmenu=abc&fk_leftmenu=def'; print '
'.$langs->trans('Title').''.$langs->trans('DetailTitre').'
'.$langs->trans('URL').''.$langs->trans('DetailUrl').'
'.$langs->trans('DetailUrl').'
'.$langs->trans('Image').''.$langs->trans('Example').': fa-global
'.$langs->trans('LangFile').'
'.$langs->trans('Position').''.$langs->trans('DetailPosition').'
'.$langs->trans('DetailPosition').'
'.$langs->trans('Enabled').'
'.$langs->trans('Target').'
'.$langs->trans('Target').''; + print ''; @@ -497,6 +526,7 @@ if ($action == 'create') { print ''.$langs->trans('DetailTarget').'
'; + print '
'; print dol_get_fiche_end(); diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 464f3e72e97..3cd35480a5d 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -113,6 +113,14 @@ $urldolibarrmodules = 'https://www.dolistore.com/'; // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('adminmodules', 'globaladmin')); +// Execution Time +$max_execution_time_for_deploy = (empty($conf->global->MODULE_UPLOAD_MAX_EXECUTION_TIME) ? 300 : $conf->global->MODULE_UPLOAD_MAX_EXECUTION_TIME); // 5mn if not defined +$max_time = @ini_get("max_execution_time"); +if ($max_time && $max_time < $max_execution_time_for_deploy) { + dol_syslog("max_execution_time=".$max_time." is lower than max_execution_time_for_deploy=".$max_execution_time_for_deploy.". We try to increase it dynamically."); + @ini_set("max_execution_time", $max_execution_time_for_deploy); // This work only if safe mode is off. also web servers has timeout of 300 +} + /* * Actions diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 4fbdf3f096b..24ee091238d 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -2194,8 +2194,6 @@ class Contact extends CommonObject */ public function getKanbanView($option = '', $arraydata = null) { - global $langs; - $selected = (empty($arraydata['selected']) ? 0 : $arraydata['selected']); $return = '
'; diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index aebd2ae4c0e..39f44e35585 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1520,7 +1520,7 @@ if ($action == 'create') { // Area with common detail of line print '
'; - print ''; + print '
'; $sql = "SELECT cd.rowid, cd.statut, cd.label as label_det, cd.fk_product, cd.product_type, cd.description, cd.price_ht, cd.qty,"; $sql .= " cd.tva_tx, cd.vat_src_code, cd.remise_percent, cd.info_bits, cd.subprice, cd.multicurrency_subprice,"; @@ -1540,6 +1540,7 @@ if ($action == 'create') { $objp = $db->fetch_object($result); + // Line title print ''; print ''; print ''; @@ -1584,7 +1585,9 @@ if ($action == 'create') { if (!empty($conf->global->CONTRACT_HIDE_CLOSED_SERVICES_BY_DEFAULT) && $objp->statut == ContratLigne::STATUS_CLOSED && $action != 'showclosedlines') { $moreparam = 'style="display: none;"'; } + print ''; + // Label if ($objp->fk_product > 0) { $productstatic->id = $objp->fk_product; @@ -1610,7 +1613,7 @@ if ($action == 'create') { $description = ''; // Already added into main visible desc } - echo $form->textwithtooltip($text, $description, 3, '', '', $cursorline, 0, (!empty($line->fk_parent_line) ?img_picto('', 'rightarrow') : '')); + print $form->textwithtooltip($text, $description, 3, '', '', $cursorline, 3, (!empty($line->fk_parent_line) ?img_picto('', 'rightarrow') : '')); print ''; } else { @@ -1666,16 +1669,16 @@ if ($action == 'create') { print "\n"; + $colspan = 6; + if (getDolGlobalInt('PRODUCT_USE_UNITS')) { + $colspan++; + } + if (isModEnabled('margin') && !empty($conf->global->MARGIN_SHOW_ON_CONTRACT)) { + $colspan++; + } + // Dates of service planed and real if ($objp->subprice >= 0) { - $colspan = 6; - - if (isModEnabled('margin') && getDolGlobalString('PRODUCT_USE_UNITS')) { - $colspan = 8; - } elseif (isModEnabled('margin') || getDolGlobalString('PRODUCT_USE_UNITS')) { - $colspan = 7; - } - print ''; print ''; - print ''; + print ''; print "\n"; } diff --git a/htdocs/core/actions_linkedfiles.inc.php b/htdocs/core/actions_linkedfiles.inc.php index b680a81521c..b599480f583 100644 --- a/htdocs/core/actions_linkedfiles.inc.php +++ b/htdocs/core/actions_linkedfiles.inc.php @@ -96,7 +96,7 @@ if (GETPOST('sendit', 'alpha') && !empty($conf->global->MAIN_UPLOAD_DOC) && !emp // Parse $newUrl $newUrlArray = parse_url($link); - // Check URL is external + // Allow external links to svg ? if (!getDolGlobalString('MAIN_ALLOW_SVG_FILES_AS_EXTERNAL_LINKS')) { if (!empty($newUrlArray['path']) && preg_match('/\.svg$/i', $newUrlArray['path'])) { $error++; @@ -104,9 +104,9 @@ if (GETPOST('sendit', 'alpha') && !empty($conf->global->MAIN_UPLOAD_DOC) && !emp setEventMessages($langs->trans('ErrorSVGFilesNotAllowedAsLinksWithout', 'MAIN_ALLOW_SVG_FILES_AS_EXTERNAL_LINKS'), null, 'errors'); } } - // Alow external links to svg ? + // Check URL is external (must refuse local link by default) if (!getDolGlobalString('MAIN_ALLOW_LOCAL_LINKS_AS_EXTERNAL_LINKS')) { - // Test $newUrlAray['host'] to check link is external using isIPAllowed() + // Test $newUrlAray['host'] to check link is external using isIPAllowed() and if not refuse the local link // TODO } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 614fdfa366a..8e1b4d62a45 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -955,8 +955,6 @@ function checkVal($out = '', $check = 'alphanohtml', $filter = null, $options = */ function sanitizeVal($out = '', $check = 'alphanohtml', $filter = null, $options = null) { - global $conf; - // TODO : use class "Validate" to perform tests (and add missing tests) if needed for factorize // Check is done after replacement switch ($check) { @@ -1044,8 +1042,9 @@ function sanitizeVal($out = '', $check = 'alphanohtml', $filter = null, $options case 'nohtml': // No html $out = dol_string_nohtmltag($out, 0); break; - case 'restricthtml': // Recommended for most html textarea case 'restricthtmlnolink': + case 'restricthtml': // Recommended for most html textarea + case 'restricthtmlallowclass': case 'restricthtmlallowunvalid': $out = dol_htmlwithnojs($out, 1, $check); break; @@ -7356,7 +7355,7 @@ function dol_nl2br($stringtoencode, $nl2brmode = 0, $forxml = false) * * @param string $stringtoencode String to encode * @param int $nouseofiframesandbox Allow use of option MAIN_SECURITY_USE_SANDBOX_FOR_HTMLWITHNOJS for html sanitizing - * @param string $check 'restricthtmlnolink' or 'restricthtml' or 'restricthtmlallowunvalid' + * @param string $check 'restricthtmlnolink' or 'restricthtml' or 'restricthtmlallowclass' or 'restricthtmlallowunvalid' * @return string HTML sanitized */ function dol_htmlwithnojs($stringtoencode, $nouseofiframesandbox = 0, $check = 'restricthtml') @@ -7415,7 +7414,7 @@ function dol_htmlwithnojs($stringtoencode, $nouseofiframesandbox = 0, $check = ' $out = preg_replace('/&#x?[0-9]+/i', '', $out); // For example if we have javascript with an entities without the ; to hide the 'a' of 'javascript'. // Keep only some html tags and remove also some 'javascript:' strings - $out = dol_string_onlythesehtmltags($out, 0, 1, 1); + $out = dol_string_onlythesehtmltags($out, 0, ($check == 'restricthtmlallowclass' ? 0 : 1), 1); // We should also exclude non expected HTML attributes and clean content of some attributes (keep only alt=, title=...). if (!empty($conf->global->MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES)) { diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php index e6e8dd819c0..d27c4dac376 100644 --- a/htdocs/core/lib/website.lib.php +++ b/htdocs/core/lib/website.lib.php @@ -760,7 +760,7 @@ function getStructuredData($type, $data = array()) $ret .= "\n".'}'."\n"; $ret .= ''."\n"; } else { - $ret .= ''."\n"; + $ret = ''."\n"; } } elseif ($type == 'product') { $ret = ''."\n"; diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 5e586cecd99..0194c45b457 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -986,7 +986,14 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM } else { print ''; } - print ($menu_array[$i]['prefix'] ? $menu_array[$i]['prefix'] : '').$menu_array[$i]['titre']; + if (!empty($menu_array[$i]['prefix'])) { + if (preg_match('/^fa-[a-zA-Z0-9-_]+$/', $menu_array[$i]['prefix'])) { + print ''; + } else { + print $menu_array[$i]['prefix']; + } + } + print $menu_array[$i]['titre']; if ($shorturlwithoutparam) { print ''; } else { @@ -997,7 +1004,10 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM } elseif ($showmenu) { // Not enabled but visible (so greyed) print ''."\n"; $lastlevel0 = 'greyed'; diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index 83676b29f43..466469423d8 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -2430,7 +2430,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it $versiontrans .= 'warning'; } - print ' + $return = '
picto, 'class="inline-block valignmiddle"', 1); } else { - print img_object($alttext, $this->picto, 'class="inline-block valignmiddle"'); + $return .= img_object($alttext, $this->picto, 'class="inline-block valignmiddle"'); } } else { - print img_object($alttext, 'generic', 'class="inline-block valignmiddle"'); + $return .= img_object($alttext, 'generic', 'class="inline-block valignmiddle"'); } if ($this->isCoreOrExternalModule() == 'external' || preg_match('/development|experimental|deprecated/i', $version)) { @@ -2458,34 +2458,36 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it $versionTitle.= '
'.$langs->trans('ModuleUpdateAvailable').' : '.$this->lastVersion; } - print ''; - print $this->getVersion(1); - print ''; + $return .= ''; + $return .= $this->getVersion(1); + $return .= ''; } - print '
+ $return .= '
'.$this->getName().' '.nl2br($this->getDesc()).''; - print '
'; - print '
'; - print '
'; - print $codetoconfig; - print '
'; - print '
'; - print $codeenabledisable; - print '
'; - print '
'; + $return .= '
'; + $return .= '
'; + $return .= $codetoconfig; + $return .= '
'; + $return .= '
'; + $return .= $codeenabledisable; + $return .= '
'; + $return .= '
'; - print ' + $return .= '
'; + + return $return; } /** diff --git a/htdocs/fichinter/card-rec.php b/htdocs/fichinter/card-rec.php index 068a90a3371..575b38a0cdd 100644 --- a/htdocs/fichinter/card-rec.php +++ b/htdocs/fichinter/card-rec.php @@ -581,7 +581,7 @@ if ($action == 'create') { print '
'.$langs->trans("ServiceNb", $cursorline).''.$langs->trans("VAT").'
'; @@ -1832,8 +1835,17 @@ if ($action == 'create') { if (!empty($conf->global->CONTRACT_HIDE_CLOSED_SERVICES_BY_DEFAULT) && $object->lines[$cursorline - 1]->statut == ContratLigne::STATUS_CLOSED && $action != 'showclosedlines') { $moreparam = 'style="display: none;"'; } + + $colspan = 6; + if (getDolGlobalInt('PRODUCT_USE_UNITS')) { + $colspan++; + } + if (isModEnabled('margin') && !empty($conf->global->MARGIN_SHOW_ON_CONTRACT)) { + $colspan++; + } + print '


'; print ''; if ($action == 'contrat') { - $formcontract = new Formcontract($db); + $formcontract = new FormContract($db); $formcontract->formSelectContract($_SERVER["PHP_SELF"].'?id='.$object->id, $object->socid, $object->fk_contrat, 'contratid', 0, 1); } else { if ($object->fk_contrat) { diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 36ff728fe75..fe5850a6cd9 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -1248,7 +1248,7 @@ if ($action == 'create') { print ''; print ''; if ($action == 'contrat') { - $formcontract = new Formcontract($db); + $formcontract = new FormContract($db); $formcontract->formSelectContract($_SERVER["PHP_SELF"].'?id='.$object->id, $object->socid, $object->fk_contrat, 'contratid', 0, 1, 1); } else { if ($object->fk_contrat) { diff --git a/htdocs/install/mysql/tables/llx_menu.sql b/htdocs/install/mysql/tables/llx_menu.sql index 52b576411cb..0561dfdf8e5 100644 --- a/htdocs/install/mysql/tables/llx_menu.sql +++ b/htdocs/install/mysql/tables/llx_menu.sql @@ -36,7 +36,7 @@ CREATE TABLE llx_menu url varchar(255) NOT NULL, -- Relative (or absolute) url to go target varchar(100) NULL, -- Target of Url link titre varchar(255) NOT NULL, -- Key for menu translation - prefix varchar(255) NULL, -- prefix + prefix varchar(255) NULL, -- picto langs varchar(100), -- Lang file to load for translation level smallint, -- Deprecated. Not used. perms text, -- Condition to show enabled or disabled diff --git a/htdocs/langs/en_US/dict.lang b/htdocs/langs/en_US/dict.lang index e3b159e50de..bbd536679fe 100644 --- a/htdocs/langs/en_US/dict.lang +++ b/htdocs/langs/en_US/dict.lang @@ -137,7 +137,7 @@ CountryLV=Latvia CountryLB=Lebanon CountryLS=Lesotho CountryLR=Liberia -CountryLY=Libyan +CountryLY=Libya CountryLI=Liechtenstein CountryLT=Lithuania CountryLU=Luxembourg diff --git a/htdocs/societe/class/societeaccount.class.php b/htdocs/societe/class/societeaccount.class.php index 82ff5c41c11..4d4fdc012d8 100644 --- a/htdocs/societe/class/societeaccount.class.php +++ b/htdocs/societe/class/societeaccount.class.php @@ -534,6 +534,8 @@ class SocieteAccount extends CommonObject return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'), 'statut5'); } } + + return ''; } /** diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index c007bd5d5fd..a46e3b329be 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -2532,7 +2532,7 @@ img.photorefnoborder { } .tdhrthin { - margin: 0; + margin: 0 !important; padding-bottom: 0 !important; } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index a8b73cbdd1f..328d41e8720 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -2706,7 +2706,7 @@ img.photorefnoborder { border-bottom: 1px solid var(--colortopbordertitle1) !important; } .tdhrthin { - margin: 0; + margin: 0 !important; padding-bottom: 0 !important; } /* Payment Screen : Pointer cursor in the autofill image */