diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php
index 4a53e4ce571..a1747296e22 100644
--- a/htdocs/core/class/translate.class.php
+++ b/htdocs/core/class/translate.class.php
@@ -682,7 +682,7 @@ class Translate
}
}
- $str = str_replace('%)', '__percent_parenthesis__', $str);
+ $str = preg_replace('/([^%])%([^0sd])/', '__percent_parenthesis__', $str);
if (strpos($key, 'Format') !== 0) {
try {
diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php
index c5c875fcfb9..1bf8f9e06b8 100644
--- a/htdocs/core/lib/admin.lib.php
+++ b/htdocs/core/lib/admin.lib.php
@@ -1270,7 +1270,7 @@ function activateModule($value, $withdeps = 1, $noconfverification = 0)
if ($activateerr) {
$ret['errors'][] = $activateerr;
}
- $ret['errors'][] = $langs->trans('activateModuleDependNotSatisfied', $objMod->name, $modulestring);
+ $ret['errors'][] = $langs->trans('activateModuleDependNotSatisfied', $objMod->name, $modulestring, $objMod->name).'
'.$langs->trans('activateModuleDependNotSatisfied2', $modulestring, $objMod->name);
}
}
}
diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php
index 2383a86619f..dbf57ef03d6 100644
--- a/htdocs/core/lib/project.lib.php
+++ b/htdocs/core/lib/project.lib.php
@@ -2797,6 +2797,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks
}
print '
';
+ $alttext = '';
if ($objp->opp_percent && $objp->opp_amount) {
$opp_weighted_amount = $objp->opp_percent * $objp->opp_amount / 100;
$alttext = $langs->trans("OpportunityWeightedAmount").' '.price($opp_weighted_amount, 0, '', 1, -1, 0, $conf->currency);
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 7859c0eec2f..322057484fc 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -2114,7 +2114,8 @@ AddSubstitutions=Add keys substitutions
DetectionNotPossible=Detection not possible
UrlToGetKeyToUseAPIs=Url to get token to use API (once token has been received it is saved in database user table and must be provided on each API call)
ListOfAvailableAPIs=List of available APIs
-activateModuleDependNotSatisfied=Module "%s" depends on module "%s", that is missing, so module "%1$s" may not work correctly. Please install module "%2$s" or disable module "%1$s" if you want to be safe from any surprise
+activateModuleDependNotSatisfied=Module "%s" depends on module "%s", that is missing, so module "%s" may not work correctly.
+activateModuleDependNotSatisfied2=Please install module "%s" or disable module "%s" if you want to be safe from any surprise.
CommandIsNotInsideAllowedCommands=The command you are trying to run is not in the list of allowed commands defined in parameter $dolibarr_main_restrict_os_commands in the conf.php file.
LandingPage=Landing page
SamePriceAlsoForSharedCompanies=If you use a multicompany module, with the choice "Single price", the price will also be the same for all companies if products are shared between environments
diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php
index 340c2f73eaa..5114564141b 100644
--- a/htdocs/projet/class/project.class.php
+++ b/htdocs/projet/class/project.class.php
@@ -2250,6 +2250,9 @@ class Project extends CommonObject
$this->monthWorkLoadPerTask[$week_number][$obj->fk_element] = $obj->element_duration;
} else {
$this->monthWorkLoad[$week_number] += $obj->element_duration;
+ if (!isset($this->monthWorkLoadPerTask[$week_number][$obj->fk_element])) {
+ $this->monthWorkLoadPerTask[$week_number][$obj->fk_element] = 0;
+ }
$this->monthWorkLoadPerTask[$week_number][$obj->fk_element] += $obj->element_duration;
}
$weekalreadyfound[$week_number] = 1;
diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php
index 45811e74f5c..494e3f20774 100644
--- a/htdocs/projet/tasks/task.php
+++ b/htdocs/projet/tasks/task.php
@@ -81,7 +81,10 @@ if ($reshook < 0) {
}
if ($id > 0 || $ref) {
- $object->fetch($id, $ref);
+ $ret = $object->fetch($id, $ref);
+ if ($ret > 0) {
+ $projectstatic->fetch($object->fk_project);
+ }
}
// Security check
@@ -244,7 +247,7 @@ if ($action == 'remove_file' && $user->hasRight('projet', 'creer')) {
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$langs->load("other");
- $upload_dir = $conf->project->dir_output;
+ $upload_dir = $conf->project->dir_output."/".dol_sanitizeFileName($projectstatic->ref)."/".dol_sanitizeFileName($object->ref);
$file = $upload_dir.'/'.dol_sanitizeFileName(GETPOST('file'));
$ret = dol_delete_file($file);
@@ -263,7 +266,6 @@ $form = new Form($db);
$formother = new FormOther($db);
$formfile = new FormFile($db);
$formproject = new FormProjets($db);
-$result = $projectstatic->fetch($object->fk_project);
$title = $object->ref;
if (!empty($withproject)) {
@@ -758,7 +760,7 @@ if ($id > 0 || !empty($ref)) {
/*
* Generated documents
*/
- $filename = dol_sanitizeFileName($projectstatic->ref)."/".dol_sanitizeFileName($object->ref);
+ $filename = '';
$filedir = $conf->project->dir_output."/".dol_sanitizeFileName($projectstatic->ref)."/".dol_sanitizeFileName($object->ref);
$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
$genallowed = ($user->hasRight('projet', 'lire'));
diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php
index 053f085045b..5365b05435e 100644
--- a/htdocs/ticket/card.php
+++ b/htdocs/ticket/card.php
@@ -77,6 +77,7 @@ $cancel = GETPOST('cancel', 'alpha');
$backtopage = GETPOST('backtopage', 'alpha');
$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
+$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit;
$sortfield = GETPOST('sortfield', 'aZ09comma') ? GETPOST('sortfield', 'aZ09comma') : "a.datep";
$sortorder = GETPOST('sortorder', 'aZ09comma') ? GETPOST('sortorder', 'aZ09comma') : "desc";
$search_rowid = GETPOST('search_rowid');
|