From a5a5fe55f6476b0a0cc2a07366f4c880e196c52f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 3 Apr 2020 14:55:46 +0200 Subject: [PATCH] Code simpler --- htdocs/admin/modules.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 4056bca0ee3..280f17adfe2 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -761,6 +761,7 @@ if ($mode == 'common') print ''."\n"; // Link config + print ''; if (!empty($objMod->config_page_url) && !$disableSetup) { $backtourlparam = ''; @@ -770,9 +771,9 @@ if ($mode == 'common') if ($search_status > -1) $backtourlparam .= ($backtourlparam ? '&' : '?').'search_status='.$search_status; $backtourl = $_SERVER["PHP_SELF"].$backtourlparam; + $regs = array(); if (is_array($objMod->config_page_url)) { - print ''; $i = 0; foreach ($objMod->config_page_url as $page) { @@ -796,21 +797,21 @@ if ($mode == 'common') } } } - print "\n"; } elseif (preg_match('/^([^@]+)@([^@]+)$/i', $objMod->config_page_url, $regs)) { - print ''.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"').''; + print ''.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"').''; } else { - print ''.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"').''; + print ''.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"').''; } } else { - print ''.img_picto($langs->trans("NothingToSetup"), "setup", 'class="opacitytransp" style="padding-right: 6px"').''; + print img_picto($langs->trans("NothingToSetup"), "setup", 'class="opacitytransp" style="padding-right: 6px"'); } + print ''; } else // Module not yet activated {