mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-13 19:25:22 +01:00
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2020 Tobias Sekan <tobias.sekan@startmail.com>
|
||||
* Copyright (C) 2020 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
@@ -220,7 +221,7 @@ if ($elemid && $action == 'addintocategory' &&
|
||||
$newobject = new Account($db);
|
||||
$elementtype = 'bank_account';
|
||||
} else {
|
||||
dol_print_error("Not supported value of type = ".$type);
|
||||
dol_print_error(null, "Not supported value of type = ".$type);
|
||||
}
|
||||
$result = $newobject->fetch($elemid);
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ if ($user->socid > 0) {
|
||||
if (preg_match('/\.\./', $upload_dir) || preg_match('/[<>|]/', $upload_dir)) {
|
||||
dol_syslog("Refused to deliver file ".$upload_dir);
|
||||
// Do no show plain path in shown error message
|
||||
dol_print_error(0, $langs->trans("ErrorFileNameInvalid", $upload_dir));
|
||||
dol_print_error(null, $langs->trans("ErrorFileNameInvalid", $upload_dir));
|
||||
exit;
|
||||
}
|
||||
// Check permissions
|
||||
|
||||
@@ -96,7 +96,7 @@ if ($modulepart == 'ecm') {
|
||||
if (preg_match('/\.\./', $fullpathselecteddir) || preg_match('/[<>|]/', $fullpathselecteddir)) {
|
||||
dol_syslog("Refused to deliver file ".$original_file);
|
||||
// Do no show plain path in shown error message
|
||||
dol_print_error(0, $langs->trans("ErrorFileNameInvalid", GETPOST("file")));
|
||||
dol_print_error(null, $langs->trans("ErrorFileNameInvalid", GETPOST("file")));
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
@@ -913,7 +913,7 @@ abstract class CommonObject
|
||||
$sql .= " AND ref_ext = '".$db->escape($ref_ext)."'";
|
||||
} else {
|
||||
$error = 'ErrorWrongParameters';
|
||||
dol_print_error(get_class()."::isExistingObject ".$error, LOG_ERR);
|
||||
dol_syslog(get_class()."::isExistingObject ".$error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
if ($ref || $ref_ext) { // Because the same ref can exists in 2 different entities, we force the current one in priority
|
||||
|
||||
@@ -816,12 +816,12 @@ class Utils
|
||||
$moduleobj = new $class($this->db);
|
||||
} catch (Exception $e) {
|
||||
$error++;
|
||||
dol_print_error($e->getMessage());
|
||||
dol_print_error(null, $e->getMessage());
|
||||
}
|
||||
} else {
|
||||
$error++;
|
||||
$langs->load("errors");
|
||||
dol_print_error($langs->trans("ErrorFailedToLoadModuleDescriptorForXXX", $module));
|
||||
dol_print_error(null, $langs->trans("ErrorFailedToLoadModuleDescriptorForXXX", $module));
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
@@ -646,7 +646,7 @@ function dolibarr_set_const($db, $name, $value, $type = 'chaine', $visible = 0,
|
||||
|
||||
// Check parameters
|
||||
if (empty($name)) {
|
||||
dol_print_error($db, "Error: Call to function dolibarr_set_const with wrong parameters", LOG_ERR);
|
||||
dol_print_error($db, "Error: Call to function dolibarr_set_const with wrong parameters");
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ class Entrepot extends CommonObject
|
||||
'description' => array('type' => 'text', 'label' => 'Description', 'enabled' => 1, 'visible' => -2, 'position' => 35, 'searchall' => 1),
|
||||
'lieu' => array('type' => 'varchar(64)', 'label' => 'LocationSummary', 'enabled' => 1, 'visible' => 1, 'position' => 40, 'showoncombobox' => 2, 'searchall' => 1),
|
||||
'fk_parent' => array('type' => 'integer:Entrepot:product/stock/class/entrepot.class.php:1:((statut:=:1) AND (entity:IN:__SHARED_ENTITIES__))', 'label' => 'ParentWarehouse', 'enabled' => 1, 'visible' => -2, 'position' => 41),
|
||||
'fk_project' => array('type' => 'integer:Project:projet/class/project.class.php:1:(fk_statut:=:1)', 'label' => 'Project', 'enabled' => '$conf->project->enabled', 'visible' => -1, 'position' => 25),
|
||||
'fk_project' => array('type' => 'integer:Project:projet/class/project.class.php:1:(fk_statut:=:1)', 'label' => 'Project', 'enabled' => '$conf->project->enabled', 'visible' => -1, 'position' => 42),
|
||||
'address' => array('type' => 'varchar(255)', 'label' => 'Address', 'enabled' => 1, 'visible' => -2, 'position' => 45, 'searchall' => 1),
|
||||
'zip' => array('type' => 'varchar(10)', 'label' => 'Zip', 'enabled' => 1, 'visible' => -2, 'position' => 50, 'searchall' => 1),
|
||||
'town' => array('type' => 'varchar(50)', 'label' => 'Town', 'enabled' => 1, 'visible' => -2, 'position' => 55, 'searchall' => 1),
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2016-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
@@ -191,7 +192,7 @@ if (!$accessallowed) {
|
||||
if (preg_match('/\.\./', $original_file) || preg_match('/[<>|]/', $original_file)) {
|
||||
dol_syslog("Refused to deliver file ".$original_file);
|
||||
$file = basename($original_file); // Do no show plain path of original_file in shown error message
|
||||
dol_print_error(0, $langs->trans("ErrorFileNameInvalid", $file));
|
||||
dol_print_error(null, $langs->trans("ErrorFileNameInvalid", $file));
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2016-2023 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
@@ -139,7 +140,7 @@ if (!$accessallowed) {
|
||||
if (preg_match('/\.\./', $original_file) || preg_match('/[<>|]/', $original_file)) {
|
||||
dol_syslog("Refused to deliver file ".$original_file);
|
||||
$file = basename($original_file); // Do no show plain path of original_file in shown error message
|
||||
dol_print_error(0, $langs->trans("ErrorFileNameInvalid", $file));
|
||||
dol_print_error(null, $langs->trans("ErrorFileNameInvalid", $file));
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -155,7 +156,7 @@ $original_file_osencoded = dol_osencode($original_file); // New file name encode
|
||||
if (!file_exists($original_file_osencoded)) {
|
||||
$langs->load("website");
|
||||
print $langs->trans("RequestedPageHasNoContentYet", $pageid);
|
||||
//dol_print_error(0,$langs->trans("ErrorFileDoesNotExists",$original_file));
|
||||
//dol_print_error(null,$langs->trans("ErrorFileDoesNotExists",$original_file));
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2016-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
@@ -139,7 +140,7 @@ if (!$accessallowed) {
|
||||
if (preg_match('/\.\./', $original_file) || preg_match('/[<>|]/', $original_file)) {
|
||||
dol_syslog("Refused to deliver file ".$original_file);
|
||||
$file = basename($original_file); // Do no show plain path of original_file in shown error message
|
||||
dol_print_error(0, $langs->trans("ErrorFileNameInvalid", $file));
|
||||
dol_print_error(null, $langs->trans("ErrorFileNameInvalid", $file));
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -155,7 +156,7 @@ $original_file_osencoded = dol_osencode($original_file); // New file name encode
|
||||
if (!file_exists($original_file_osencoded)) {
|
||||
$langs->load("website");
|
||||
print $langs->trans("RequestedPageHasNoContentYet", $pageid);
|
||||
//dol_print_error(0,$langs->trans("ErrorFileDoesNotExists",$original_file));
|
||||
//dol_print_error(null,$langs->trans("ErrorFileDoesNotExists",$original_file));
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user