diff --git a/htdocs/contrat/class/api_contracts.class.php b/htdocs/contrat/class/api_contracts.class.php index 80083fe486e..62df847ce74 100644 --- a/htdocs/contrat/class/api_contracts.class.php +++ b/htdocs/contrat/class/api_contracts.class.php @@ -36,9 +36,7 @@ class Contracts extends DolibarrApi */ public static $FIELDS = array( 'socid', - 'date_contrat', - 'commercial_signature_id', - 'commercial_suivi_id' + 'date_contrat' ); /** diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index ec81f6786ad..d5d44de4434 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -987,6 +987,10 @@ abstract class CommonInvoice extends CommonObject */ public function getVentilExportCompta($mode = 0) { + if (!isModEnabled('accounting')) { + return 0; + } + $alreadydispatched = 0; $type = 'customer_invoice'; diff --git a/htdocs/core/filemanagerdol/connectors/php/config.inc.php b/htdocs/core/filemanagerdol/connectors/php/config.inc.php index 0704d51f615..7cb8b015ec3 100644 --- a/htdocs/core/filemanagerdol/connectors/php/config.inc.php +++ b/htdocs/core/filemanagerdol/connectors/php/config.inc.php @@ -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. diff --git a/htdocs/core/filemanagerdol/connectors/php/connector.php b/htdocs/core/filemanagerdol/connectors/php/connector.php index 25d9312015f..94ea7f864cc 100644 --- a/htdocs/core/filemanagerdol/connectors/php/connector.php +++ b/htdocs/core/filemanagerdol/connectors/php/connector.php @@ -26,6 +26,9 @@ ob_start(); require 'config.inc.php'; // This include the main.inc.php +/** + * @var array $Config + */ require 'connector.lib.php'; if (!$Config['Enabled']) { diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index e7187ccbd55..716fa432071 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -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) { diff --git a/htdocs/core/website.inc.php b/htdocs/core/website.inc.php index 2a38c042cf4..f84dbce31b8 100644 --- a/htdocs/core/website.inc.php +++ b/htdocs/core/website.inc.php @@ -318,7 +318,7 @@ foreach ($systemfunctions as $systemfunction) { if (empty($dolibarr_website_allow_custom_php) || ($dolibarr_website_allow_custom_php == 1 && $notdisabledsystemfunction)) { print '


'; - print 'Website features are protected to be disabled if the PHP system functions ('.implode(',', $systemfunctions).') are not disabled for the website context.
'; + print 'Website features are DISABLED if the PHP system functions ('.implode(',', $systemfunctions).') are NOT disabled for the website context.
'; print 'The value "'.$notdisabledsystemfunction.'" has NOT been found into the php parameter current disable_functions '; //print '