Fix impossibility to validate objects (#35202)
* Fix impossibility to validate objects * fix pre commit --------- Co-authored-by: Lucas Marcouiller <lmarcouiller@dolicloud.com>
This commit is contained in:
parent
3ba272b2fb
commit
5fa3ecd41a
2 changed files with 4 additions and 0 deletions
|
|
@ -99,6 +99,7 @@ Follow these step-by-step instructions to seamlessly upgrade Dolibarr to the lat
|
|||
|
||||
See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) file.
|
||||
|
||||
Adding new templates must be done by adding files into a module directory. Adding files into custom with same path of the core without having using a module is now forbidden
|
||||
|
||||
## FEATURES
|
||||
|
||||
|
|
|
|||
|
|
@ -1569,6 +1569,9 @@ function dol_buildpath($path, $type = 0, $returnemptyifnotfound = 0)
|
|||
}
|
||||
// if (@file_exists($dirroot.'/'.$path)) {
|
||||
if (@file_exists($dirroot . '/' . $path)) { // avoid [php:warn]
|
||||
if ($key != 'main' && preg_match('/^core\//', $path)) { // When searching into an alternative custom path, we don't want path like 'core/...' because path should be 'modulename/core/...'
|
||||
continue;
|
||||
}
|
||||
$res = $dirroot . '/' . $path;
|
||||
return $res;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue