Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
8bc9c784c7
6 changed files with 48 additions and 77 deletions
|
|
@ -8196,12 +8196,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../htdocs/core/actions_massactions.inc.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$action might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 14
|
||||
path: ../../htdocs/core/actions_massactions.inc.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$from might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
|
|
@ -8220,12 +8214,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../htdocs/core/actions_massactions.inc.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$month might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 2
|
||||
path: ../../htdocs/core/actions_massactions.inc.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$newlang in empty\(\) always exists and is always falsy\.$#'
|
||||
identifier: empty.variable
|
||||
|
|
@ -8256,12 +8244,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../htdocs/core/actions_massactions.inc.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$year might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 2
|
||||
path: ../../htdocs/core/actions_massactions.inc.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$classfile might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
|
|
@ -17394,18 +17376,6 @@ parameters:
|
|||
count: 4
|
||||
path: ../../htdocs/cron/class/cronjob.class.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$ExecTimeLimit in empty\(\) always exists and is not falsy\.$#'
|
||||
identifier: empty.variable
|
||||
count: 1
|
||||
path: ../../htdocs/cron/class/cronjob.class.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$MemoryLimit in empty\(\) always exists and is always falsy\.$#'
|
||||
identifier: empty.variable
|
||||
count: 1
|
||||
path: ../../htdocs/cron/class/cronjob.class.php
|
||||
|
||||
-
|
||||
message: '#^Ternary operator condition is always true\.$#'
|
||||
identifier: ternary.alwaysTrue
|
||||
|
|
@ -27816,12 +27786,6 @@ parameters:
|
|||
count: 2
|
||||
path: ../../htdocs/projet/tasks.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$param might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 17
|
||||
path: ../../htdocs/projet/tasks.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$permissiontodelete might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
|
|
|
|||
|
|
@ -55,10 +55,13 @@
|
|||
* @var ?string $objectlabel
|
||||
* @var ?string $option
|
||||
* @var ?int $deliveryreceipt
|
||||
* @var string $action
|
||||
* @var string $massaction
|
||||
* @var string $objectclass
|
||||
* @var string $uploaddir
|
||||
* @var string $confirm
|
||||
* @var string $month
|
||||
* @var string $year
|
||||
* @var int $error
|
||||
*/
|
||||
'
|
||||
|
|
|
|||
|
|
@ -1387,7 +1387,7 @@ class FormFile
|
|||
// Show title of list of existing files
|
||||
$morehtmlright = '';
|
||||
if (!empty($moreoptions['showhideaddbutton']) && $conf->use_javascript_ajax) {
|
||||
$tmpurlforbutton = 'javascript:console.log("open add file form");jQuery(".divattachnewfile").toggle(); if (!jQuery(".divattachnewfile").is(":hidden")) { jQuery("input[type=\'file\']").click(); }';
|
||||
$tmpurlforbutton = 'javascript:console.log("open add file form");jQuery(".divattachnewfile").toggle(); if (!jQuery(".divattachnewfile").is(":hidden")) { jQuery("input[type=\'file\']").click();}void(0);';
|
||||
$morehtmlright .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', $tmpurlforbutton, '', $permtoeditline);
|
||||
}
|
||||
|
||||
|
|
@ -2221,7 +2221,7 @@ class FormFile
|
|||
|
||||
$morehtmlright = '';
|
||||
if (!empty($moreoptions['showhideaddbutton']) && $conf->use_javascript_ajax) {
|
||||
$morehtmlright .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', 'javascript:console.log("open addlink form"); jQuery(".divlinkfile").toggle();', '', $permissiontoedit);
|
||||
$morehtmlright .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', 'javascript:console.log("open addlink form"); jQuery(".divlinkfile").toggle(); void(0);', '', $permissiontoedit);
|
||||
}
|
||||
|
||||
// Show list of associated links
|
||||
|
|
|
|||
|
|
@ -23,6 +23,46 @@
|
|||
*/
|
||||
'@phan-var-force array{nbfield:int,type?:array<int,string>,pos?:array<int,int>,val?:array<int,float>} $totalarray';
|
||||
|
||||
if (!function_exists('printTotalValCell')) { // allow two list with total on same screen
|
||||
|
||||
/** print a total cell value according to its type
|
||||
*
|
||||
* @param string $type of field (duration, string..)
|
||||
* @param string $val the value to display
|
||||
*
|
||||
* @return void (direct print)
|
||||
*/
|
||||
function printTotalValCell($type, $val)
|
||||
{
|
||||
// if $totalarray['type'] not present we consider it as number
|
||||
if (empty($type)) {
|
||||
$type = 'real';
|
||||
}
|
||||
switch ($type) {
|
||||
case 'duration':
|
||||
print '<td class="right">';
|
||||
print(!empty($val) ? convertSecondToTime((int) $val, 'allhourmin') : 0);
|
||||
print '</td>';
|
||||
break;
|
||||
case 'string': // This type is no more used. type is now varchar(x)
|
||||
print '<td class="left">';
|
||||
print(!empty($val) ? $val : '');
|
||||
print '</td>';
|
||||
break;
|
||||
case 'stock':
|
||||
print '<td class="right">';
|
||||
print price2num(!empty($val) ? $val : 0, 'MS');
|
||||
print '</td>';
|
||||
break;
|
||||
default:
|
||||
print '<td class="right">';
|
||||
print price(!empty($val) ? $val : 0);
|
||||
print '</td>';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Move fields of totalizable into the common array pos and val
|
||||
if (!empty($totalarray['totalizable']) && is_array($totalarray['totalizable'])) {
|
||||
foreach ($totalarray['totalizable'] as $keytotalizable => $valtotalizable) {
|
||||
|
|
@ -107,40 +147,3 @@ if (isset($totalarray['pos'])) {
|
|||
}
|
||||
//print '</tfoot>';
|
||||
}
|
||||
|
||||
/** print a total cell value according to its type
|
||||
*
|
||||
* @param string $type of field (duration, string..)
|
||||
* @param string $val the value to display
|
||||
*
|
||||
* @return void (direct print)
|
||||
*/
|
||||
function printTotalValCell($type, $val)
|
||||
{
|
||||
// if $totalarray['type'] not present we consider it as number
|
||||
if (empty($type)) {
|
||||
$type = 'real';
|
||||
}
|
||||
switch ($type) {
|
||||
case 'duration':
|
||||
print '<td class="right">';
|
||||
print(!empty($val) ? convertSecondToTime((int) $val, 'allhourmin') : 0);
|
||||
print '</td>';
|
||||
break;
|
||||
case 'string': // This type is no more used. type is now varchar(x)
|
||||
print '<td class="left">';
|
||||
print(!empty($val) ? $val : '');
|
||||
print '</td>';
|
||||
break;
|
||||
case 'stock':
|
||||
print '<td class="right">';
|
||||
print price2num(!empty($val) ? $val : 0, 'MS');
|
||||
print '</td>';
|
||||
break;
|
||||
default:
|
||||
print '<td class="right">';
|
||||
print price(!empty($val) ? $val : 0);
|
||||
print '</td>';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1223,7 +1223,7 @@ class Cronjob extends CommonObject
|
|||
dol_syslog(get_class($this)."::run_jobs jobtype=".$this->jobtype." userlogin=".$userlogin, LOG_DEBUG);
|
||||
|
||||
// Increase limit of time. Works only if we are not in safe mode
|
||||
$ExecTimeLimit = 600;
|
||||
$ExecTimeLimit = getDolGlobalInt('MAIN_CRON_EXEC_TIME_LIMIT', 600);
|
||||
if (!empty($ExecTimeLimit)) {
|
||||
$err = error_reporting();
|
||||
error_reporting(0); // Disable all errors
|
||||
|
|
@ -1231,7 +1231,7 @@ class Cronjob extends CommonObject
|
|||
@set_time_limit($ExecTimeLimit); // Need more than 240 on Windows 7/64
|
||||
error_reporting($err);
|
||||
}
|
||||
$MemoryLimit = 0;
|
||||
$MemoryLimit = getDolGlobalString('MAIN_CRON_MEMORY_LIMIT');
|
||||
if (!empty($MemoryLimit)) {
|
||||
@ini_set('memory_limit', $MemoryLimit);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -448,6 +448,7 @@ $help_url = "EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos";
|
|||
llxHeader("", $title, $help_url, '', 0, 0, '', '', '', 'mod-project page-card_tasks');
|
||||
|
||||
$arrayofselected = is_array($toselect) ? $toselect : array();
|
||||
$param = '';
|
||||
|
||||
if ($id > 0 || !empty($ref)) {
|
||||
$result = $object->fetch($id, $ref);
|
||||
|
|
|
|||
Loading…
Reference in a new issue