Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
6fcec74fed
34 changed files with 162 additions and 75 deletions
|
|
@ -131,4 +131,4 @@ tter.com/eldy10</a></div></div>
|
|||
ps://www.twitter.com/eldy10" target=3D"_blank">https://www.twitter.com/eldy=
|
||||
10</a></div>
|
||||
|
||||
--000000000000cd54be05ad51fe67--
|
||||
--000000000000cd54be05ad51fe67--
|
||||
|
|
@ -542,7 +542,6 @@ return [
|
|||
'htdocs/core/class/fiscalyear.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/class/google.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/core/class/hookmanager.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeInvalidDimOffset', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/class/html.form.class.php' => ['PhanTypeConversionFromArray', 'PhanTypeInvalidDimOffset', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredProperty', 'PhanPluginUnknownObjectMethodCall'],
|
||||
'htdocs/core/class/html.formaccounting.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/class/html.formadmin.class.php' => ['PhanPluginUnknownArrayMethodParamType'],
|
||||
'htdocs/core/class/html.formbarcode.class.php' => ['PhanPluginUnknownArrayMethodParamType'],
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
* Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2021-2023 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Benjamin Falière <benjamin.faliere@altairis.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -225,7 +226,7 @@ if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massa
|
|||
$massaction = '';
|
||||
}
|
||||
|
||||
$parameters = array('socid' => isset($socid) ? $socid : null);
|
||||
$parameters = array('socid' => isset($socid) ? $socid : null, 'arrayfields' => &$arrayfields);
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
|
|
|||
|
|
@ -315,31 +315,37 @@ if ($mode == 'setup' && $user->admin) {
|
|||
print $langs->trans("IsTokenGenerated");
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if (is_object($tokenobj)) {
|
||||
print $form->textwithpicto(yn(1), $langs->trans("HasAccessToken").' : '.dol_print_date($storage->date_modification, 'dayhour').' state='.dol_escape_htmltag($storage->state));
|
||||
if ($keyforprovider != 'Login') {
|
||||
if (is_object($tokenobj)) {
|
||||
print $form->textwithpicto(yn(1), $langs->trans("HasAccessToken").' : '.dol_print_date($storage->date_modification, 'dayhour').' state='.dol_escape_htmltag($storage->state));
|
||||
} else {
|
||||
print '<span class="opacitymedium">'.$langs->trans("NoAccessToken").'</span>';
|
||||
}
|
||||
} else {
|
||||
print '<span class="opacitymedium">'.$langs->trans("NoAccessToken").'</span>';
|
||||
print '<span class="opacitymedium">'.$langs->trans("TokenNotRequiredForOAuthLogin").'</span>';
|
||||
}
|
||||
print '</td>';
|
||||
print '<td width="50%">';
|
||||
// Links to delete/checks token
|
||||
if (is_object($tokenobj)) {
|
||||
//test on $storage->hasAccessToken($OAUTH_SERVICENAME) ?
|
||||
if ($urltodelete) {
|
||||
print '<a class="button smallpaddingimp reposition" href="'.$urltodelete.'">'.$langs->trans('DeleteAccess').'</a><br>';
|
||||
} else {
|
||||
print '<span class="opacitymedium">'.$langs->trans('GoOnTokenProviderToDeleteToken').'</span><br>';
|
||||
if ($keyforprovider != 'Login') {
|
||||
// Links to delete/checks token
|
||||
if (is_object($tokenobj)) {
|
||||
//test on $storage->hasAccessToken($OAUTH_SERVICENAME) ?
|
||||
if ($urltodelete) {
|
||||
print '<a class="button smallpaddingimp reposition" href="'.$urltodelete.'">'.$langs->trans('DeleteAccess').'</a><br>';
|
||||
} else {
|
||||
print '<span class="opacitymedium">'.$langs->trans('GoOnTokenProviderToDeleteToken').'</span><br>';
|
||||
}
|
||||
}
|
||||
// Request remote token
|
||||
if ($urltorenew) {
|
||||
print '<a class="button smallpaddingimp reposition" href="'.$urltorenew.'">'.$langs->trans('GetAccess').'</a>';
|
||||
print $form->textwithpicto('', $langs->trans('RequestAccess'));
|
||||
print '<br>';
|
||||
}
|
||||
// Check remote access
|
||||
if ($urltocheckperms) {
|
||||
print '<br>'.$langs->trans("ToCheckDeleteTokenOnProvider", $OAUTH_SERVICENAME).': <a href="'.$urltocheckperms.'" target="_'.strtolower($OAUTH_SERVICENAME).'">'.$urltocheckperms.'</a>';
|
||||
}
|
||||
}
|
||||
// Request remote token
|
||||
if ($urltorenew) {
|
||||
print '<a class="button smallpaddingimp reposition" href="'.$urltorenew.'">'.$langs->trans('GetAccess').'</a>';
|
||||
print $form->textwithpicto('', $langs->trans('RequestAccess'));
|
||||
print '<br>';
|
||||
}
|
||||
// Check remote access
|
||||
if ($urltocheckperms) {
|
||||
print '<br>'.$langs->trans("ToCheckDeleteTokenOnProvider", $OAUTH_SERVICENAME).': <a href="'.$urltocheckperms.'" target="_'.strtolower($OAUTH_SERVICENAME).'">'.$urltocheckperms.'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ $head = webhookAdminPrepareHead();
|
|||
print dol_get_fiche_head($head, 'settings', $langs->trans($page_name), -1, "webhook");
|
||||
|
||||
// Setup page goes here
|
||||
echo '<span class="opacitymedium">'.$langs->trans("WebhookSetupPage").'</span><br><br>';
|
||||
echo '<span class="opacitymedium">'.$langs->trans("WebhookSetupPage", $langs->transnoentitiesnoconv("Targets")).'</span><br><br>';
|
||||
|
||||
|
||||
if ($action == 'edit') {
|
||||
|
|
@ -339,10 +339,11 @@ if ($action == 'edit') {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
if (empty($setupnotempty)) {
|
||||
print '<br>'.$langs->trans("NothingToSetup");
|
||||
}
|
||||
*/
|
||||
|
||||
// Page end
|
||||
print dol_get_fiche_end();
|
||||
|
|
|
|||
|
|
@ -441,6 +441,52 @@ if (Luracast\Restler\Defaults::$returnResponse) {
|
|||
echo $result;
|
||||
}
|
||||
|
||||
if (getDolGlobalInt("API_ENABLE_COUNT_CALLS") && $api->r->responseCode == 200) {
|
||||
$error = 0;
|
||||
$db->begin();
|
||||
$userid = DolibarrApiAccess::$user->id;
|
||||
|
||||
$sql = "SELECT up.value";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."user_param as up";
|
||||
$sql .= " WHERE up.param = 'API_COUNT_CALL'";
|
||||
$sql .= " AND up.fk_user = ".((int) $userid);
|
||||
$sql .= " AND up.entity = ".((int) $conf->entity);
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
$updateapi = false;
|
||||
$nbrows = $db->num_rows($result);
|
||||
if ($nbrows == 0) {
|
||||
$sql2 = "INSERT INTO ".MAIN_DB_PREFIX."user_param";
|
||||
$sql2 .= " (fk_user, entity, param, value)";
|
||||
$sql2 .= " VALUES (".((int) $userid).", ".((int) $conf->entity).", 'API_COUNT_CALL', 1)";
|
||||
} else {
|
||||
$updateapi = true;
|
||||
$sql2 = "UPDATE ".MAIN_DB_PREFIX."user_param as up";
|
||||
$sql2 .= " SET up.value = up.value + 1";
|
||||
$sql2 .= " WHERE up.param = 'API_COUNT_CALL'";
|
||||
$sql2 .= " AND up.fk_user = ".((int) $userid);
|
||||
$sql2 .= " AND up.entity = ".((int) $conf->entity);
|
||||
}
|
||||
|
||||
$result2 = $db->query($sql2);
|
||||
if (!$result2) {
|
||||
$modeapicall = $updateapi ? 'updating' : 'inserting';
|
||||
dol_syslog('Error while '.$modeapicall. ' API_COUNT_CALL for user '.$userid, LOG_ERR);
|
||||
$error++;
|
||||
}
|
||||
} else {
|
||||
dol_syslog('Error on select API_COUNT_CALL for user '.$userid, LOG_ERR);
|
||||
$error++;
|
||||
}
|
||||
|
||||
if ($error) {
|
||||
$db->rollback();
|
||||
} else {
|
||||
$db->commit();
|
||||
}
|
||||
}
|
||||
|
||||
// Call API termination method
|
||||
$apiMethodInfo = &$api->r->apiMethodInfo;
|
||||
$terminateCall = '_terminate_' . $apiMethodInfo->methodName . '_' . $api->r->responseFormat->getExtension();
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
* Copyright (C) 2019 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
||||
* Copyright (C) 2020 Open-Dsi <support@open-dsi.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Benjamin Falière <benjamin.faliere@altairis.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -347,7 +348,7 @@ if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massa
|
|||
$massaction = '';
|
||||
}
|
||||
|
||||
$parameters = array();
|
||||
$parameters = array('arrayfields' => &$arrayfields);
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
* Copyright (C) 2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 Benjamin Falière <benjamin.faliere@altairis.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -223,7 +224,7 @@ if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massa
|
|||
$massaction = '';
|
||||
}
|
||||
|
||||
$parameters = array('socid' => $socid);
|
||||
$parameters = array('socid' => $socid, 'arrayfields' => &$arrayfields);
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
|
|
|||
|
|
@ -5210,7 +5210,7 @@ class Form
|
|||
* @param string $title Title
|
||||
* @param string $question Question
|
||||
* @param string $action Action
|
||||
* @param array<array{label:string,type:string,size:string,morecss:string,moreattr:string,style:string}> $formquestion An array with complementary inputs to add into forms: array(array('label'=> ,'type'=> , 'size'=>, 'morecss'=>, 'moreattr'=>'autofocus' or 'style=...'))
|
||||
* @param array{text:string}|array<array{label:string,type:string,size:string,morecss:string,moreattr:string,style:string}> $formquestion An array with complementary inputs to add into forms: array(array('label'=> ,'type'=> , 'size'=>, 'morecss'=>, 'moreattr'=>'autofocus' or 'style=...'))
|
||||
* @param string $selectedchoice "" or "no" or "yes"
|
||||
* @param int|string $useajax 0=No, 1=Yes use Ajax to show the popup, 2=Yes and also submit page with &confirm=no if choice is No, 'xxx'=Yes and preoutput confirm box with div id=dialog-confirm-xxx
|
||||
* @param int $height Force height of box
|
||||
|
|
@ -5244,8 +5244,8 @@ class Form
|
|||
* @param array<array{name:string,value:string,values:string[],default:string,label:string,type:string,size:string,morecss:string,moreattr:string,style:string,inputko?:int<0,1>}>|string|null $formquestion An array with complementary inputs to add into forms: array(array('label'=> ,'type'=> , 'size'=>, 'morecss'=>, 'moreattr'=>'autofocus' or 'style=...'))
|
||||
* 'type' can be 'text', 'password', 'checkbox', 'radio', 'date', 'datetime', 'select', 'multiselect', 'morecss',
|
||||
* 'other', 'onecolumn' or 'hidden'...
|
||||
* @param int|string $selectedchoice '' or 'no', or 'yes' or '1', 1, '0' or 0
|
||||
* @param int|string $useajax 0=No, 1=Yes use Ajax to show the popup, 2=Yes and also submit page with &confirm=no if choice is No, 'xxx'=Yes and preoutput confirm box with div id=dialog-confirm-xxx
|
||||
* @param int<0,1>|''|'no'|'yes'|'1'|'0' $selectedchoice '' or 'no', or 'yes' or '1', 1, '0' or 0
|
||||
* @param int<0,2>|string $useajax 0=No, 1=Yes use Ajax to show the popup, 2=Yes and also submit page with &confirm=no if choice is No, 'xxx'=Yes and preoutput confirm box with div id=dialog-confirm-xxx
|
||||
* @param int|string $height Force height of box (0 = auto)
|
||||
* @param int $width Force width of box ('999' or '90%'). Ignored and forced to 90% on smartphones.
|
||||
* @param int $disableformtag 1=Disable form tag. Can be used if we are already inside a <form> section.
|
||||
|
|
@ -5450,8 +5450,8 @@ class Form
|
|||
array_push($inputok, $input['name']);
|
||||
}
|
||||
}
|
||||
// Add name of fields to propagate with the GET when submitting the form with button KO.
|
||||
if (isset($input['inputko']) && $input['inputko'] == 1 && isset($input['name'])) {
|
||||
// Add name of fields to propagate with the GET when submitting the form with button KO. @phan-suppress-next-line PhanTypePossiblyInvalidDimOffset
|
||||
if (array_key_exists('inputko', $input) && $input['inputko'] == 1 && isset($input['name'])) {
|
||||
array_push($inputko, $input['name']);
|
||||
}
|
||||
}
|
||||
|
|
@ -5459,7 +5459,7 @@ class Form
|
|||
|
||||
// Show JQuery confirm box.
|
||||
$formconfirm .= '<div id="' . $dialogconfirm . '" title="' . dol_escape_htmltag($title) . '" style="display: none;">';
|
||||
if (is_array($formquestion) && !empty($formquestion['text'])) {
|
||||
if (is_array($formquestion) && array_key_exists('text', $formquestion) && !empty($formquestion['text'])) {
|
||||
$formconfirm .= '<div class="confirmtext">' . $formquestion['text'] . '</div>' . "\n";
|
||||
}
|
||||
if (!empty($more)) {
|
||||
|
|
@ -5600,7 +5600,7 @@ class Form
|
|||
$formconfirm .= '</td></tr>' . "\n";
|
||||
|
||||
// Line text
|
||||
if (is_array($formquestion) && !empty($formquestion['text'])) {
|
||||
if (is_array($formquestion) && array_key_exists('text', $formquestion) && !empty($formquestion['text'])) {
|
||||
$formconfirm .= '<tr class="valid"><td class="valid" colspan="2">' . $formquestion['text'] . '</td></tr>' . "\n";
|
||||
}
|
||||
|
||||
|
|
@ -9016,13 +9016,13 @@ class Form
|
|||
//$listoffieldsforselection .= '<li>-----</li>';
|
||||
continue;
|
||||
}
|
||||
if ($val['label']) {
|
||||
if (!empty($val['label']) && $val['label']) {
|
||||
if (!empty($val['langfile']) && is_object($langs)) {
|
||||
$langs->load($val['langfile']);
|
||||
}
|
||||
|
||||
// Note: $val['checked'] <> 0 means we must show the field into the combo list
|
||||
$listoffieldsforselection .= '<li><input type="checkbox" id="checkbox' . $key . '" value="' . $key . '"' . ((empty($val['checked']) || $val['checked'] == '-1') ? '' : ' checked="checked"') . '/><label for="checkbox' . $key . '">' . dol_escape_htmltag($langs->trans($val['label'])) . '</label></li>';
|
||||
// Note: $val['checked'] <> 0 means we must show the field into the combo list @phan-suppress-next-line PhanTypePossiblyInvalidDimOffset
|
||||
$listoffieldsforselection .= '<li><input type="checkbox" id="checkbox' . $key . '" value="' . $key . '"' . ((!array_key_exists('checked', $val) || empty($val['checked']) || $val['checked'] == '-1') ? '' : ' checked="checked"') . '/><label for="checkbox' . $key . '">' . dol_escape_htmltag($langs->trans($val['label'])) . '</label></li>';
|
||||
$listcheckedstring .= (empty($val['checked']) ? '' : $key . ',');
|
||||
}
|
||||
}
|
||||
|
|
@ -9799,6 +9799,7 @@ class Form
|
|||
}
|
||||
}
|
||||
} elseif ($object->element == 'member') {
|
||||
'@phan-var-force Adherent $object';
|
||||
$ret .= $object->ref . '<br>';
|
||||
$fullname = $object->getFullName($langs);
|
||||
if ($object->morphy == 'mor' && $object->societe) {
|
||||
|
|
@ -9811,6 +9812,7 @@ class Form
|
|||
} elseif ($object->element == 'usergroup') {
|
||||
$ret .= dol_htmlentities($object->name);
|
||||
} elseif (in_array($object->element, array('action', 'agenda'))) {
|
||||
'@phan-var-force ActionComm $object';
|
||||
$ret .= $object->ref . '<br>' . $object->label;
|
||||
} elseif (in_array($object->element, array('adherent_type'))) {
|
||||
$ret .= $object->label;
|
||||
|
|
@ -9855,6 +9857,7 @@ class Form
|
|||
|
||||
// Complete object if not complete
|
||||
if (empty($object->barcode_type_code) || empty($object->barcode_type_coder)) {
|
||||
// @phan-suppress-next-line PhanPluginUnknownObjectMethodCall
|
||||
$result = $object->fetch_barcode();
|
||||
//Check if fetch_barcode() failed
|
||||
if ($result < 1) {
|
||||
|
|
@ -9862,7 +9865,7 @@ class Form
|
|||
}
|
||||
}
|
||||
|
||||
// Barcode image
|
||||
// Barcode image @phan-suppress-next-line PhanUndeclaredProperty
|
||||
$url = DOL_URL_ROOT . '/viewimage.php?modulepart=barcode&generator=' . urlencode($object->barcode_type_coder) . '&code=' . urlencode($object->barcode) . '&encoding=' . urlencode($object->barcode_type_code);
|
||||
$out = '<!-- url barcode = ' . $url . ' -->';
|
||||
$out .= '<img src="' . $url . '"' . ($morecss ? ' class="' . $morecss . '"' : '') . '>';
|
||||
|
|
@ -9892,7 +9895,7 @@ class Form
|
|||
global $conf, $langs;
|
||||
|
||||
$entity = (empty($object->entity) ? $conf->entity : $object->entity);
|
||||
$id = (empty($object->id) ? $object->rowid : $object->id);
|
||||
$id = (empty($object->id) ? $object->rowid : $object->id); // @phan-suppress-current-line PhanUndeclaredProperty (->rowid)
|
||||
|
||||
$dir = '';
|
||||
$file = '';
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
* Copyright (C) 2020 Thibault FOUCART <support@ptibogxiv.net>
|
||||
* Copyright (C) 2023 Christophe Battarel <christophe@altairis.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Benjamin Falière <benjamin.faliere@altairis.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -170,7 +171,7 @@ if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massa
|
|||
$massaction = '';
|
||||
}
|
||||
|
||||
$parameters = array('socid' => $socid);
|
||||
$parameters = array('socid' => $socid, 'arrayfields' => &$arrayfields);
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
* Copyright (C) 2022 Charlène Benke <charlene@patas-monkey.com>
|
||||
* Copyright (C) 2024 William Mead <william.mead@manchenumerique.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Benjamin Falière <benjamin.faliere@altairis.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -176,7 +177,7 @@ if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massa
|
|||
$massaction = '';
|
||||
}
|
||||
|
||||
$parameters = array('socid' => $socid);
|
||||
$parameters = array('socid' => $socid, 'arrayfields' => &$arrayfields);
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* Copyright (C) 2012-2016 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 Benjamin Falière <benjamin.faliere@altairis.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -182,7 +183,7 @@ if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massa
|
|||
$massaction = '';
|
||||
}
|
||||
|
||||
$parameters = array('socid' => $socid);
|
||||
$parameters = array('socid' => $socid, 'arrayfields' => &$arrayfields);
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
|
|
|||
|
|
@ -301,3 +301,5 @@ ALTER TABLE llx_bookcal_calendar ADD COLUMN entity integer DEFAULT 1 NOT NULL AF
|
|||
|
||||
ALTER TABLE llx_rights_def ADD COLUMN module_origin varchar(64) AFTER module;
|
||||
ALTER TABLE llx_rights_def ADD COLUMN enabled text NULL AFTER bydefault;
|
||||
|
||||
DELETE FROM llx_c_action_trigger WHERE code = 'BILLREC_AUTOCREATEBILL';
|
||||
|
|
|
|||
|
|
@ -1814,6 +1814,7 @@ DetailRight=Condition to display unauthorized gray menus
|
|||
DetailLangs=Lang file name for label code translation
|
||||
DetailUser=Intern / Extern / All
|
||||
Target=Target
|
||||
Targets=Targets
|
||||
DetailTarget=Target for links (_blank top opens a new window)
|
||||
DetailLevel=Level (-1:top menu, 0:header menu, >0 menu and sub menu)
|
||||
ModifMenu=Menu change
|
||||
|
|
@ -2134,6 +2135,7 @@ oauthToken=OAuth2 token
|
|||
accessType=Access type
|
||||
oauthService=Oauth service
|
||||
TokenMustHaveBeenCreated=Module OAuth2 must be enabled and an oauth2 token must have been created with the correct permissions (for example scope "gmail_full" with OAuth for Gmail).
|
||||
TokenNotRequiredForOAuthLogin=Token unnecessary for OAuth entry used for Login
|
||||
ImapEncryption = IMAP encryption method
|
||||
ImapEncryptionHelp = Example: none, ssl, tls, notls
|
||||
NoRSH = Use the NoRSH configuration
|
||||
|
|
@ -2335,7 +2337,7 @@ ExportUseLowMemoryModeHelp=Use the low memory mode to generate the dump file (co
|
|||
ModuleWebhookName = Webhook
|
||||
ModuleWebhookDesc = Interface to catch dolibarr triggers and send data of the event to an URL
|
||||
WebhookSetup = Webhook setup
|
||||
WebhookSetupPage = Webhook setup page
|
||||
WebhookSetupPage = Webhook setup page. To activate a webhook, go on the %s tab and create targets
|
||||
ShowQuickAddLink=Show a button to quickly add an element in top right menu
|
||||
ShowSearchAreaInTopMenu=Show the search area in the top menu
|
||||
HashForPing=Hash used for ping
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
* Copyright (C) 2022 Charlene Benke <charlene@patas-monkey.com>
|
||||
* Copyright (C) 2020-2023 Alexandre Spangaro <aspangaro@easya.solutions>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Benjamin Falière <benjamin.faliere@altairis.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -332,7 +333,7 @@ if (GETPOST('cancel', 'alpha')) {
|
|||
if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') {
|
||||
$massaction = '';
|
||||
}
|
||||
$parameters = array();
|
||||
$parameters = array('arrayfields' => &$arrayfields);
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
* Copyright (C) 2020 Tobias Sean <tobias.sekan@startmail.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 Benjamin Falière <benjamin.faliere@altairis.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -277,7 +278,7 @@ if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massa
|
|||
$massaction = '';
|
||||
}
|
||||
|
||||
$parameters = array('socid' => $socid);
|
||||
$parameters = array('socid' => $socid, 'arrayfields' => &$arrayfields);
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2023 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Benjamin Falière <benjamin.faliere@altairis.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -164,7 +165,7 @@ if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massa
|
|||
$massaction = '';
|
||||
}
|
||||
|
||||
$parameters = array('socid' => $socid);
|
||||
$parameters = array('socid' => $socid, 'arrayfields' => &$arrayfields);
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
* Copyright (C) 2022 Anthony Berton <anthony.berton@bb2a.fr>
|
||||
* Copyright (C) 2023 William Mead <william.mead@manchenumerique.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Benjamin Falière <benjamin.faliere@altairis.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -376,7 +377,7 @@ if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massa
|
|||
$massaction = '';
|
||||
}
|
||||
|
||||
$parameters = array();
|
||||
$parameters = array('arrayfields' => &$arrayfields);
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
* Copyright (C) 2018-2023 Charlene Benke <charlene@patas-monkey.com>
|
||||
* Copyright (C) 2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Benjamin Falière <benjamin.faliere@altairis.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -219,7 +220,7 @@ if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massa
|
|||
$massaction = '';
|
||||
}
|
||||
|
||||
$parameters = array('socid' => $socid);
|
||||
$parameters = array('socid' => $socid, 'arrayfields' => &$arrayfields);
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
|
|
|||
|
|
@ -770,6 +770,10 @@ div.floatright
|
|||
{
|
||||
display:block;
|
||||
}
|
||||
.inline
|
||||
{
|
||||
display:inline;
|
||||
}
|
||||
.inline-block
|
||||
{
|
||||
display:inline-block;
|
||||
|
|
|
|||
|
|
@ -957,6 +957,10 @@ div.floatright
|
|||
{
|
||||
display:block;
|
||||
}
|
||||
.inline
|
||||
{
|
||||
display:inline;
|
||||
}
|
||||
.inline-block
|
||||
{
|
||||
display:inline-block;
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
|
|||
|
||||
// Set parent company
|
||||
if ($action == 'set_thirdparty' && $user->hasRight('ticket', 'write')) {
|
||||
if ($object->fetch(GETPOSTINT('id'), '', GETPOSTINT('track_id')) >= 0) {
|
||||
if ($object->fetch(GETPOSTINT('id'), '', GETPOST('track_id', 'alpha')) >= 0) {
|
||||
$result = $object->setCustomer(GETPOSTINT('editcustomer'));
|
||||
$url = $_SERVER["PHP_SELF"].'?track_id='.GETPOST('track_id', 'alpha');
|
||||
header("Location: ".$url);
|
||||
|
|
|
|||
|
|
@ -337,7 +337,7 @@ if (empty($reshook)) {
|
|||
if ($action == 'update' && $permissiontoadd && $object->status < Ticket::STATUS_CLOSED) {
|
||||
$error = 0;
|
||||
|
||||
$ret = $object->fetch(GETPOSTINT('id'), GETPOSTINT('ref'), GETPOSTINT('track_id'));
|
||||
$ret = $object->fetch(GETPOSTINT('id'), GETPOSTINT('ref'), GETPOST('track_id', 'alpha'));
|
||||
if ($ret < 0) {
|
||||
$error++;
|
||||
array_push($object->errors, $langs->trans('ErrorTicketIsNotValid'));
|
||||
|
|
@ -490,7 +490,7 @@ if (empty($reshook)) {
|
|||
}
|
||||
|
||||
if (($action == "confirm_close" || $action == "confirm_abandon") && GETPOST('confirm', 'alpha') == 'yes' && $permissiontoadd) {
|
||||
$object->fetch(GETPOSTINT('id'), '', GETPOSTINT('track_id'));
|
||||
$object->fetch(GETPOSTINT('id'), '', GETPOST('track_id', 'alpha'));
|
||||
|
||||
if ($object->close($user, ($action == "confirm_abandon" ? 1 : 0))) {
|
||||
setEventMessages($langs->trans('TicketMarkedAsClosed'), null, 'mesgs');
|
||||
|
|
@ -505,7 +505,7 @@ if (empty($reshook)) {
|
|||
}
|
||||
|
||||
if ($action == "confirm_public_close" && GETPOST('confirm', 'alpha') == 'yes' && $permissiontoadd) {
|
||||
$object->fetch(GETPOSTINT('id'), '', GETPOSTINT('track_id'));
|
||||
$object->fetch(GETPOSTINT('id'), '', GETPOST('track_id', 'alpha'));
|
||||
if ($_SESSION['email_customer'] == $object->origin_email || $_SESSION['email_customer'] == $object->thirdparty->email) {
|
||||
$object->context['contact_id'] = GETPOSTINT('contact_id');
|
||||
|
||||
|
|
@ -523,7 +523,7 @@ if (empty($reshook)) {
|
|||
}
|
||||
|
||||
if ($action == 'confirm_delete_ticket' && GETPOST('confirm', 'alpha') == "yes" && $permissiontodelete) {
|
||||
if ($object->fetch(GETPOSTINT('id'), '', GETPOSTINT('track_id')) >= 0) {
|
||||
if ($object->fetch(GETPOSTINT('id'), '', GETPOST('track_id', 'alpha')) >= 0) {
|
||||
if ($object->delete($user) > 0) {
|
||||
setEventMessages('<div class="confirm">'.$langs->trans('TicketDeletedSuccess').'</div>', null, 'mesgs');
|
||||
header("Location: ".DOL_URL_ROOT."/ticket/list.php");
|
||||
|
|
@ -538,7 +538,7 @@ if (empty($reshook)) {
|
|||
|
||||
// Set parent company
|
||||
if ($action == 'set_thirdparty' && $user->hasRight('ticket', 'write')) {
|
||||
if ($object->fetch(GETPOSTINT('id'), '', GETPOSTINT('track_id')) >= 0) {
|
||||
if ($object->fetch(GETPOSTINT('id'), '', GETPOST('track_id', 'alpha')) >= 0) {
|
||||
$result = $object->setCustomer(GETPOSTINT('editcustomer'));
|
||||
$url = $_SERVER["PHP_SELF"].'?track_id='.GETPOST('track_id', 'alpha');
|
||||
header("Location: ".$url);
|
||||
|
|
@ -548,7 +548,7 @@ if (empty($reshook)) {
|
|||
|
||||
// Set progress status
|
||||
if ($action == 'set_progression' && $user->hasRight('ticket', 'write')) {
|
||||
if ($object->fetch(GETPOSTINT('id'), '', GETPOSTINT('track_id')) >= 0) {
|
||||
if ($object->fetch(GETPOSTINT('id'), '', GETPOST('track_id', 'alpha')) >= 0) {
|
||||
$result = $object->setProgression(GETPOST('progress', 'alpha'));
|
||||
|
||||
$url = 'card.php?track_id='.$object->track_id;
|
||||
|
|
@ -559,7 +559,7 @@ if (empty($reshook)) {
|
|||
|
||||
// Set categories
|
||||
if ($action == 'set_categories' && $user->hasRight('ticket', 'write')) {
|
||||
if ($object->fetch(GETPOSTINT('id'), '', GETPOSTINT('track_id')) >= 0) {
|
||||
if ($object->fetch(GETPOSTINT('id'), '', GETPOST('track_id', 'alpha')) >= 0) {
|
||||
$result = $object->setCategories(GETPOST('categories', 'array'));
|
||||
|
||||
$url = 'card.php?track_id='.$object->track_id;
|
||||
|
|
@ -593,7 +593,7 @@ if (empty($reshook)) {
|
|||
}
|
||||
|
||||
if ($action == 'confirm_reopen' && $user->hasRight('ticket', 'manage') && !GETPOST('cancel')) {
|
||||
if ($object->fetch(GETPOSTINT('id'), '', GETPOSTINT('track_id')) >= 0) {
|
||||
if ($object->fetch(GETPOSTINT('id'), '', GETPOST('track_id', 'alpha')) >= 0) {
|
||||
// prevent browser refresh from reopening ticket several times
|
||||
if ($object->status == Ticket::STATUS_CLOSED || $object->status == Ticket::STATUS_CANCELED) {
|
||||
if ($object->fk_user_assign != null) {
|
||||
|
|
@ -613,7 +613,7 @@ if (empty($reshook)) {
|
|||
}
|
||||
} elseif ($action == 'classin' && $permissiontoadd) {
|
||||
// Categorisation dans projet
|
||||
if ($object->fetch(GETPOSTINT('id'), '', GETPOSTINT('track_id')) >= 0) {
|
||||
if ($object->fetch(GETPOSTINT('id'), '', GETPOST('track_id', 'alpha')) >= 0) {
|
||||
$object->setProject($projectid);
|
||||
$url = 'card.php?track_id='.$object->track_id;
|
||||
header("Location: ".$url);
|
||||
|
|
@ -621,7 +621,7 @@ if (empty($reshook)) {
|
|||
}
|
||||
} elseif ($action == 'setcontract' && $permissiontoadd) {
|
||||
// Categorisation dans contrat
|
||||
if ($object->fetch(GETPOSTINT('id'), '', GETPOSTINT('track_id')) >= 0) {
|
||||
if ($object->fetch(GETPOSTINT('id'), '', GETPOST('track_id', 'alpha')) >= 0) {
|
||||
$object->setContract(GETPOSTINT('contractid'));
|
||||
$url = 'card.php?track_id='.$object->track_id;
|
||||
header("Location: ".$url);
|
||||
|
|
@ -650,7 +650,7 @@ if (empty($reshook)) {
|
|||
$action = 'view';
|
||||
} elseif ($action == 'confirm_set_status' && $permissiontoadd && !GETPOST('cancel')) {
|
||||
// Reopen ticket
|
||||
if ($object->fetch(GETPOSTINT('id'), GETPOSTINT('track_id')) >= 0) {
|
||||
if ($object->fetch(GETPOSTINT('id'), GETPOST('track_id', 'alpha')) >= 0) {
|
||||
$new_status = GETPOSTINT('new_status');
|
||||
//$old_status = $object->status;
|
||||
$res = $object->setStatut($new_status);
|
||||
|
|
@ -667,7 +667,7 @@ if (empty($reshook)) {
|
|||
|
||||
// Action to update an extrafield
|
||||
if ($action == "update_extras" && $permissiontoadd) {
|
||||
$object->fetch(GETPOSTINT('id'), '', GETPOSTINT('track_id'));
|
||||
$object->fetch(GETPOSTINT('id'), '', GETPOST('track_id', 'alpha'));
|
||||
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'restricthtml'));
|
||||
if ($ret < 0) {
|
||||
|
|
@ -691,7 +691,7 @@ if (empty($reshook)) {
|
|||
}
|
||||
|
||||
if ($action == "change_property" && GETPOST('btn_update_ticket_prop', 'alpha') && $permissiontoadd) {
|
||||
$object->fetch(GETPOSTINT('id'), '', GETPOSTINT('track_id'));
|
||||
$object->fetch(GETPOSTINT('id'), '', GETPOST('track_id', 'alpha'));
|
||||
|
||||
$object->type_code = GETPOST('update_value_type', 'aZ09');
|
||||
$object->severity_code = GETPOST('update_value_severity', 'aZ09');
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ if ($action == 'deletecontact' && $user->hasRight('ticket', 'write')) {
|
|||
|
||||
// Set parent company
|
||||
if ($action == 'set_thirdparty' && $user->hasRight('ticket', 'write')) {
|
||||
if ($object->fetch(GETPOSTINT('id'), '', GETPOSTINT('track_id')) >= 0) {
|
||||
if ($object->fetch(GETPOSTINT('id'), '', GETPOST('track_id', 'alpha')) >= 0) {
|
||||
$result = $object->setCustomer(GETPOSTINT('editcustomer'));
|
||||
$url = $_SERVER["PHP_SELF"].'?track_id='.GETPOST('track_id', 'alpha');
|
||||
header("Location: ".$url);
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
|
|||
|
||||
// Set parent company
|
||||
if ($action == 'set_thirdparty' && $user->hasRight('ticket', 'write')) {
|
||||
if ($object->fetch(GETPOSTINT('id'), '', GETPOSTINT('track_id')) >= 0) {
|
||||
if ($object->fetch(GETPOSTINT('id'), '', GETPOST('track_id', 'alpha')) >= 0) {
|
||||
$result = $object->setCustomer(GETPOSTINT('editcustomer'));
|
||||
$url = $_SERVER["PHP_SELF"].'?track_id='.GETPOST('track_id', 'alpha');
|
||||
header("Location: ".$url);
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
* Copyright (C) 2019-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2023 Charlene Benke <charlene@patas-monkey.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Benjamin Falière <benjamin.faliere@altairis.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -197,7 +198,7 @@ if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massa
|
|||
$massaction = '';
|
||||
}
|
||||
|
||||
$parameters = array();
|
||||
$parameters = array('arrayfields' => &$arrayfields);
|
||||
if ($socid > 0) {
|
||||
$parameters['socid'] = $socid;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
|
|||
|
||||
// Set parent company
|
||||
if ($action == 'set_thirdparty' && $user->hasRight('ticket', 'write')) {
|
||||
if ($object->fetch(GETPOSTINT('id'), '', GETPOSTINT('track_id')) >= 0) {
|
||||
if ($object->fetch(GETPOSTINT('id'), '', GETPOST('track_id', 'alpha')) >= 0) {
|
||||
$result = $object->setCustomer(GETPOSTINT('editcustomer'));
|
||||
$url = $_SERVER["PHP_SELF"].'?track_id='.GETPOST('track_id', 'alpha');
|
||||
header("Location: ".$url);
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2016 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Benjamin Falière <benjamin.faliere@altairis.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -172,7 +173,7 @@ $search_thirdparty = GETPOST('search_thirdparty', 'alpha');
|
|||
$search_job = GETPOST('search_job', 'alpha');
|
||||
$search_warehouse = GETPOST('search_warehouse', 'alpha');
|
||||
$search_supervisor = GETPOST('search_supervisor', 'intcomma');
|
||||
$search_categ = GETPOSTINT("search_categ");
|
||||
$search_categ = GETPOST("search_categ", 'intcomma');
|
||||
$searchCategoryUserOperator = 0;
|
||||
if (GETPOSTISSET('formfilteraction')) {
|
||||
$searchCategoryUserOperator = GETPOSTINT('search_category_user_operator');
|
||||
|
|
@ -190,7 +191,7 @@ if (!empty($catid) && empty($search_categ)) {
|
|||
}
|
||||
|
||||
// Default search
|
||||
if ($search_status == '') {
|
||||
if ($search_status == '' && empty($search_all)) {
|
||||
$search_status = '1';
|
||||
}
|
||||
if ($contextpage == 'employeelist' && !GETPOSTISSET('search_employee')) {
|
||||
|
|
@ -237,7 +238,7 @@ if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massa
|
|||
$massaction = '';
|
||||
}
|
||||
|
||||
$parameters = array();
|
||||
$parameters = array('arrayfields' => &$arrayfields);
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
|
@ -686,8 +687,10 @@ if (!empty($catid)) {
|
|||
}
|
||||
|
||||
if ($search_all) {
|
||||
$setupstring = '';
|
||||
foreach ($fieldstosearchall as $key => $val) {
|
||||
$fieldstosearchall[$key] = $langs->trans($val);
|
||||
$setupstring .= $key."=".$val.";";
|
||||
}
|
||||
print '<!-- Search done like if USER_QUICKSEARCH_ON_FIELDS = '.$setupstring.' -->'."\n";
|
||||
print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).implode(', ', $fieldstosearchall).'</div>';
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2016 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2022 Open-Dsi <support@open-dsi.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Benjamin Falière <benjamin.faliere@altairis.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -172,7 +173,7 @@ if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massa
|
|||
$massaction = '';
|
||||
}
|
||||
|
||||
$parameters = array();
|
||||
$parameters = array('arrayfields' => &$arrayfields);
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
|
|
|||
|
|
@ -106,9 +106,9 @@ class Target extends CommonObject
|
|||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => 1, 'index' => 1, 'css' => 'left', 'comment' => "Id"),
|
||||
'ref' => array('type' => 'varchar(128)', 'label' => 'Ref', 'enabled' => 1, 'position' => 20, 'notnull' => 1, 'visible' => 4, 'noteditable' => 1, 'index' => 1, 'searchall' => 1, 'validate' => 1, 'comment' => "Reference of object"),
|
||||
'label' => array('type' => 'varchar(255)', 'label' => 'Label', 'enabled' => 1, 'position' => 30, 'notnull' => 0, 'visible' => 1, 'searchall' => 1, 'css' => 'minwidth300', 'cssview' => 'wordbreak', 'help' => "Help text", 'showoncombobox' => 2, 'validate' => 1,),
|
||||
'url' => array('type' => 'varchar(255)', 'label' => 'Url', 'enabled' => 1, 'position' => 50, 'notnull' => 1, 'visible' => 1,),
|
||||
'trigger_codes' => array('type' => 'text', 'label' => 'TriggerCodes', 'enabled' => 1, 'position' => 55, 'notnull' => 1, 'visible' => 1, 'help' => "TriggerCodeInfo",),
|
||||
'label' => array('type' => 'varchar(255)', 'label' => 'Label', 'enabled' => 1, 'position' => 30, 'notnull' => 0, 'visible' => 1, 'searchall' => 1, 'css' => 'minwidth300', 'cssview' => 'wordbreak', 'csslist'=>'tdoverflowmax150', 'showoncombobox' => 2, 'validate' => 1,),
|
||||
'trigger_codes' => array('type' => 'text', 'label' => 'TriggerCodes', 'enabled' => 1, 'position' => 50, 'notnull' => 1, 'visible' => 1, 'help' => "TriggerCodeInfo", 'tdcss'=>'titlefieldmiddle'),
|
||||
'url' => array('type' => 'varchar(255)', 'label' => 'Url', 'enabled' => 1, 'position' => 55, 'notnull' => 1, 'visible' => 1,),
|
||||
'description' => array('type' => 'text', 'label' => 'Description', 'enabled' => 1, 'position' => 60, 'notnull' => 0, 'visible' => 3, 'validate' => 1,),
|
||||
'note_public' => array('type' => 'html', 'label' => 'NotePublic', 'enabled' => 1, 'position' => 61, 'notnull' => 0, 'visible' => 0, 'cssview' => 'wordbreak', 'validate' => 1,),
|
||||
'note_private' => array('type' => 'html', 'label' => 'NotePrivate', 'enabled' => 1, 'position' => 62, 'notnull' => 0, 'visible' => 0, 'cssview' => 'wordbreak', 'validate' => 1,),
|
||||
|
|
@ -805,7 +805,9 @@ class Target extends CommonObject
|
|||
}
|
||||
|
||||
$statusType = 'status'.$status;
|
||||
//if ($status == self::STATUS_VALIDATED) $statusType = 'status1';
|
||||
if ($status == self::STATUS_VALIDATED) {
|
||||
$statusType = 'status4';
|
||||
}
|
||||
if ($status == self::STATUS_CANCELED) {
|
||||
$statusType = 'status6';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ $form = new Form($db);
|
|||
$now = dol_now();
|
||||
//$help_url = "EN:Module_Target|FR:Module_Target_FR|ES:Módulo_Target";
|
||||
$help_url = '';
|
||||
$title = $langs->trans('ListOf', $langs->transnoentitiesnoconv("Targets"));
|
||||
$title = $langs->trans("Targets");
|
||||
|
||||
$morejs = array();
|
||||
$morecss = array();
|
||||
|
|
|
|||
|
|
@ -116,6 +116,8 @@ if ($rss) {
|
|||
if (is_array($arrayofblogs)) {
|
||||
foreach ($arrayofblogs as $blog) {
|
||||
$blog->fullpageurl = $website->virtualhost.'/'.$blog->pageurl.'.php';
|
||||
$blog->image = preg_replace('/__WEBSITE_KEY__/', $websitekey, $blog->image);
|
||||
|
||||
$eventarray[] = $blog;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue