diff --git a/htdocs/admin/system/perf.php b/htdocs/admin/system/perf.php
index 33295044a3e..ec6dc9d4a88 100644
--- a/htdocs/admin/system/perf.php
+++ b/htdocs/admin/system/perf.php
@@ -530,13 +530,6 @@ if (!in_array($conf->browser->name, array('chrome', 'opera', 'safari', 'firefox'
}
print '
';
-// Database statistics update
-/*
-print '
';
-print ''.$langs->trans("DatabaseStatistics").': ';
-print '
';
-*/
-
// End of page
llxFooter();
$db->close();
diff --git a/htdocs/index.php b/htdocs/index.php
index 54d76de6190..efa4de3890d 100644
--- a/htdocs/index.php
+++ b/htdocs/index.php
@@ -895,7 +895,7 @@ if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS))
if (!empty($boxstatFromHook) || !empty($boxstatItems)) {
$boxstat .= ''."\n";
$boxstat .= '
| ';
$boxstat .= ' '.$langs->trans("DolibarrStateBoard").' ';
diff --git a/htdocs/modulebuilder/template/scripts/mymodule.php b/htdocs/modulebuilder/template/scripts/mymodule.php
index 684d58c1c03..0b8d7abfdfe 100644
--- a/htdocs/modulebuilder/template/scripts/mymodule.php
+++ b/htdocs/modulebuilder/template/scripts/mymodule.php
@@ -53,7 +53,10 @@ if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/master.i
if (!$res && file_exists("../master.inc.php")) $res = @include "../master.inc.php";
if (!$res && file_exists("../../master.inc.php")) $res = @include "../../master.inc.php";
if (!$res && file_exists("../../../master.inc.php")) $res = @include "../../../master.inc.php";
-if (!$res) die("Include of master fails");
+if (!$res) {
+ print "Include of master fails";
+ exit(-1);
+}
// After this $db, $mysoc, $langs, $conf and $hookmanager are defined (Opened $db handler to database will be closed at end of file).
// $user is created but empty.
diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php
index 21a03de6b40..8b7c325d742 100644
--- a/htdocs/projet/element.php
+++ b/htdocs/projet/element.php
@@ -535,18 +535,18 @@ if (! empty($conf->global->PROJECT_ELEMENTS_FOR_PLUS_MARGIN)) {
}
$newelementforplusmargin = explode(',', $conf->global->PROJECT_ELEMENTS_FOR_PLUS_MARGIN);
foreach ($newelementforplusmargin as $value) {
- $listofreferent[$value]['margin']='add';
+ $listofreferent[trim($value)]['margin']='add';
}
}
if (! empty($conf->global->PROJECT_ELEMENTS_FOR_MINUS_MARGIN)) {
foreach ($listofreferent as $key => $element) {
- if ($listofreferent[$key]['margin'] == 'add') {
+ if ($listofreferent[$key]['margin'] == 'minus') {
unset($listofreferent[$key]['margin']);
}
}
- $newelementforplusmargin = explode(',', $conf->global->PROJECT_ELEMENTS_FOR_MINUS_MARGIN);
- foreach ($newelementforplusmargin as $value) {
- $listofreferent[$value]['margin']='minus';
+ $newelementforminusmargin = explode(',', $conf->global->PROJECT_ELEMENTS_FOR_MINUS_MARGIN);
+ foreach ($newelementforminusmargin as $value) {
+ $listofreferent[trim($value)]['margin']='minus';
}
}
@@ -650,6 +650,8 @@ print ' | '.$langs->trans("AmountHT").' | '; print ''.$langs->trans("AmountTTC").' | '; print '|||||
| '.$langs->trans("Profit").' | '; -print ''.price(price2num($balance_ht, 'MT')).' | '; -print ''.price(price2num($balance_ttc, 'MT')).' | '; +print ''.$langs->trans("Profit").' | '; +print ''.price(price2num($balance_ht, 'MT')).' | '; +print ''.price(price2num($balance_ttc, 'MT')).' | '; print '||
| '.$langs->trans("Margin").' | '; + print ''.round(100 * $balance_ht / $total_revenue_ht, 1).'% | '; + print ''; + print ' | |||||