Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2026-04-20 22:20:19 +02:00
commit 98b74773fd
7 changed files with 21 additions and 9 deletions

View file

@ -36,9 +36,7 @@ class Contracts extends DolibarrApi
*/
public static $FIELDS = array(
'socid',
'date_contrat',
'commercial_signature_id',
'commercial_suivi_id'
'date_contrat'
);
/**

View file

@ -987,6 +987,10 @@ abstract class CommonInvoice extends CommonObject
*/
public function getVentilExportCompta($mode = 0)
{
if (!isModEnabled('accounting')) {
return 0;
}
$alreadydispatched = 0;
$type = 'customer_invoice';

View file

@ -33,9 +33,9 @@ define('NOTOKENRENEWAL', 1); // Disables token renewal
// is a security hole if anybody can access without
// being an authenticated user.
require_once '../../../../main.inc.php';
/**
* @var Conf $conf
* @var User $user
*
* @var string $dolibarr_main_data_root
* @var string $dolibarr_main_url_root
@ -49,6 +49,13 @@ if ($pos == '/') {
//define('DOL_URL_ROOT', $pos);
$entity = ((!empty($_SESSION['dol_entity']) && $_SESSION['dol_entity'] > 1) ? $_SESSION['dol_entity'] : null);
if (!empty($user->admin) && !$user->hasRight('website', 'write')) {
accessforbidden('Need to be admin or having write permission on website module');
exit;
}
// SECURITY: You must explicitly enable this "connector". (Set it to "true").
// WARNING: don't just set "$Config['Enabled'] = true ;", you must be sure that only
// authenticated users can access this file or use some kind of session checking.

View file

@ -26,6 +26,9 @@
ob_start();
require 'config.inc.php'; // This include the main.inc.php
/**
* @var array<string,mixed> $Config
*/
require 'connector.lib.php';
if (!$Config['Enabled']) {

View file

@ -2566,7 +2566,7 @@ function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &
if ($lines[$i]->id > 0) {
//var_dump('totalforeachday after taskid='.$lines[$i]->id.' and previous one on level '.$level);
//var_dump($totalforeachday);
$ret = projectLinesPerMonth($inc, $firstdaytoshow, $fuser, $lines[$i]->id, ($parent == 0 ? $lineswithoutlevel0 : $lines), $level, $projectsrole, $tasksrole, $mine, $restricteditformytask, $isavailable, $oldprojectforbreak, $TWeek);
$ret = projectLinesPerMonth($inc, $firstdaytoshow, $fuser, $lines[$i]->id, ($parent == 0 ? $lineswithoutlevel0 : $lines), $level, $projectsrole, $tasksrole, $mine, $restricteditformytask, $isavailable, $oldprojectforbreak, $TWeek, $arrayfields);
//var_dump('ret with parent='.$lines[$i]->id.' level='.$level);
//var_dump($ret);
foreach ($ret as $key => $val) {

View file

@ -318,7 +318,7 @@ foreach ($systemfunctions as $systemfunction) {
if (empty($dolibarr_website_allow_custom_php) || ($dolibarr_website_allow_custom_php == 1 && $notdisabledsystemfunction)) {
print '<center><br><br>';
print 'Website features are protected to be disabled if the PHP system functions ('.implode(',', $systemfunctions).') are not disabled for the website context.<br>';
print 'Website features are DISABLED if the PHP system functions ('.implode(',', $systemfunctions).') are NOT disabled for the website context.<br>';
print 'The value "'.$notdisabledsystemfunction.'" has NOT been found into the php parameter <b>current disable_functions</b> ';
//print '<textarea cols="100" rows="5">';
$form = new Form($db);

View file

@ -4161,7 +4161,7 @@ if ($action == 'editcss') {
$head = websiteconfigPrepareHead($object);
print dol_get_fiche_head($head, 'general', $langs->trans("General"), 0, 'website');
print '<!-- Edit Website properties -->'."\n";
print '<!-- Edit Website properties (CSS, Language, ...) -->'."\n";
print '<table class="border centpercent">';
// Website
@ -4188,7 +4188,7 @@ if ($action == 'editcss') {
$htmltext = '';
print $form->textwithpicto($langs->trans('MainLanguage'), $htmltext, 1, 'help', '', 0, 2, 'WEBSITE_LANG');
print '</td><td>';
print img_picto('', 'language', 'class="picotfixedwidth"');
print img_picto('', 'language', 'class="pictofixedwidth"');
print $formadmin->select_language((GETPOSTISSET('WEBSITE_LANG') ? GETPOST('WEBSITE_LANG', 'aZ09comma') : ($object->lang ? $object->lang : '0')), 'WEBSITE_LANG', 0, array(), 1, 0, 0, 'minwidth300', 2, 0, 0, array(), 1);
print '</td>';
print '</tr>';
@ -4198,7 +4198,7 @@ if ($action == 'editcss') {
$htmltext = $langs->trans("Example").': fr,de,sv,it,pt';
print $form->textwithpicto($langs->trans('OtherLanguages'), $htmltext, 1, 'help', '', 0, 2);
print '</td><td>';
print img_picto('', 'language', 'class="picotfixedwidth"');
print img_picto('', 'language', 'class="pictofixedwidth"');
print '<input type="text" class="flat maxwidth200" value="'.(GETPOSTISSET('WEBSITE_OTHERLANG') ? GETPOST('WEBSITE_OTHERLANG', 'alpha') : $object->otherlang).'" name="WEBSITE_OTHERLANG">';
print '</td>';
print '</tr>';