This commit is contained in:
Laurent Destailleur 2025-11-19 10:57:11 +01:00
parent d858764b15
commit 613a4bab2d
6 changed files with 13 additions and 10 deletions

View file

@ -47,7 +47,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
$langs->loadLangs(array('companies', 'members'));
$action = GETPOST('action', 'aZ09');
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'thirdpartyagenda';
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : getDolDefaultContextPage(__FILE__);
if (GETPOSTISARRAY('actioncode')) {
$actioncode = GETPOST('actioncode', 'array:alpha', 3);

View file

@ -505,7 +505,7 @@ if (GETPOST('withtab', 'alpha')) {
if ($action == 'deletefile') {
$langs->load("companies"); // Need for string DeleteFile+ConfirmDeleteFiles
print $form->formconfirm(
$_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode(GETPOST("urlfile")).'&linkid='.GETPOSTINT('linkid').(empty($param) ? '' : $param),
$_SERVER["PHP_SELF"].'?urlfile='.urlencode(GETPOST("urlfile")).'&linkid='.GETPOSTINT('linkid').(empty($param) ? '' : $param),
$langs->trans('DeleteFile'),
$langs->trans('ConfirmDeleteFile'),
'confirm_deletefile',

View file

@ -291,7 +291,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
$out .= '&originid='.$objthirdparty->id.($objthirdparty->id > 0 ? '&socid='.$objthirdparty->id : '');
}
$out .= (!empty($objcon->id) ? '&contactid='.$objcon->id : '').'&origin=contact&originid='.$object->id.'&backtopage='.urlencode($_SERVER['PHP_SELF'].($objcon->id > 0 ? '?id='.$objcon->id : ''));
$out .= '&datep='.urlencode(dol_print_date(dol_now(), 'dayhourlog'), 'tzuserrel');
$out .= '&datep='.urlencode(dol_print_date(dol_now(), 'dayhourlog', 'tzuserrel'));
}
if ($user->hasRight('agenda', 'myactions', 'create') || $user->hasRight('agenda', 'allactions', 'create')) {
@ -342,6 +342,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
$titlelist = $langs->trans("Actions").(is_numeric($nbEvent) ? '<span class="opacitymedium colorblack paddingleft">('.$nbEvent.')</span>' : '');
}
$morehtmlright = '';
print_barre_liste($titlelist, 0, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 0);
// List of all actions

View file

@ -65,7 +65,7 @@ class FormActions
* @param integer $onlyselect 0=Standard, 1=Hide percent of completion and force usage of a select list, 2=Same than 1 and add "Incomplete (Todo+Running)
* @param string $morecss More css on select field
* @param int $nooutput 1=No output, return string. 0=Print on output
* @return void
* @return string|void
*/
public function form_select_status_action($formname, $selected, $canedit = 1, $htmlname = 'complete', $showempty = 0, $onlyselect = 0, $morecss = 'maxwidth100', $nooutput = 0)
{

View file

@ -47,9 +47,9 @@ function dol_basename($pathfile)
* @param string $utf8_path Starting path from which to search. This is a full path.
* @param string $types Can be "directories", "files", or "all"
* @param int $recursive Determines whether subdirectories are searched
* @param string|string[] $filter Regex or Array of Regex filter to restrict list. The regex value must be escaped for '/' by doing preg_quote($var,'/'), since this char is used for preg_match function,
* but must NOT contains the start and end '/'. Filter is checked into basename only.
* @param string|string[] $excludefilter Array of Regex for exclude filter (example: array('(\.meta|_preview.*\.png)$','^\.')). Exclude is checked both into fullpath and into basename (So '^xxx' may exclude 'xxx/dirscanned/...' and dirscanned/xxx').
* @param string|string[]|null $filter Regex or Array of Regex filter to restrict list. The regex value must be escaped for '/' by doing preg_quote($var,'/'), since this char is used for preg_match function,
* but must NOT contains the start and end '/'. Filter is checked into basename only.
* @param string|string[]|null $excludefilter Array of Regex for exclude filter (example: array('(\.meta|_preview.*\.png)$','^\.')). Exclude is checked both into fullpath and into basename (So '^xxx' may exclude 'xxx/dirscanned/...' and dirscanned/xxx').
* @param string $sortcriteria Sort criteria ('','fullname','relativename','name','date','size')
* @param int $sortorder Sort order (SORT_ASC, SORT_DESC)
* @param int $mode 0=Return array minimum keys loaded (faster), 1=Force all keys like date and size to be loaded (slower), 2=Force load of date only, 3=Force load of size only, 4=Force load of perm
@ -70,7 +70,7 @@ function dol_dir_list($utf8_path, $types = "all", $recursive = 0, $filter = "",
// Verify filters (only on the first call of the function)
$filter_ok = true;
if (!is_array($filter)) {
if (!empty($filter) && !is_array($filter)) {
if (strlen($filter) > 25000) { // Note that limit depends on syntax of filter
dol_syslog("Value for filter is too large", LOG_ERR);
$filter_ok = false;

View file

@ -126,7 +126,7 @@ if (!function_exists('str_contains')) {
* Return the full path of the directory where a module (or an object of a module) stores its files.
* Path may depends on the entity if a multicompany module is enabled.
*
* @param CommonObject $object Dolibarr common object.
* @param CommonObject|BlockedLog $object Dolibarr common object.
* @param string $module Override object element, for example to use 'mycompany' instead of 'societe'
* @param int $forobject Return the more complete path for the given object instead of for the module only.
* @param string $mode 'output' (full main dir) or 'outputrel' (relative dir) or 'temp' (full dir for temporary files) or 'version' (full dir for archived files)
@ -8487,7 +8487,8 @@ function get_default_tva(Societe $thirdparty_seller, Societe $thirdparty_buyer,
// Allow an external module to bypass the calculation of prices
$parameters = array('vatvalue' => $vatvalue, 'vatrule' => $vatrule);
$tmpobject = null; $tmpaction = null;
$tmpobject = null; $tmpaction = '';
// @phan-ignore-next-line PhanPluginConstantVariableNull
$reshook = $hookmanager->executeHooks('get_default_tva', $parameters, $tmpobject, $tmpaction);
if ($reshook > 0 && !empty($hookmanager->resArray['vatvalue'])) {
$vatvalue = $hookmanager->resArray['vatvalue'];