Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts: htdocs/admin/system/filecheck.php
This commit is contained in:
commit
a8de7b850a
@ -72,7 +72,7 @@ while ($i < $argc)
|
||||
|
||||
if (empty($release))
|
||||
{
|
||||
print "Error: Missing release paramater\n";
|
||||
print "Error: Missing release parameter\n";
|
||||
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
||||
exit -1;
|
||||
}
|
||||
@ -164,7 +164,7 @@ $iterator1 = new RecursiveIteratorIterator($dir_iterator1);
|
||||
// Need to ignore document custom etc. Note: this also ignore natively symbolic links.
|
||||
$files = new RegexIterator($iterator1, '#^(?:[A-Z]:)?(?:/(?!(?:'.($includecustom?'':'custom\/|').'documents\/|conf\/|install\/))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i');
|
||||
*/
|
||||
$regextoinclude='\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$';
|
||||
$regextoinclude='\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$';
|
||||
$regextoexclude='('.($includecustom?'':'custom|').'documents|conf|install|public\/test|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
|
||||
$files = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
|
||||
$dir='';
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2005-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2007-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||
* Copyright (C) 2015-2019 Frederic France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2017 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -214,7 +214,7 @@ if (! $error && $xml)
|
||||
$includecustom=(empty($xml->dolibarr_htdocs_dir[0]['includecustom'])?0:$xml->dolibarr_htdocs_dir[0]['includecustom']);
|
||||
|
||||
// Defined qualified files (must be same than into generate_filelist_xml.php)
|
||||
$regextoinclude='\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$';
|
||||
$regextoinclude='\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$';
|
||||
$regextoexclude='('.($includecustom?'':'custom|').'documents|conf|install|public\/test|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
|
||||
$scanfiles = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude);
|
||||
|
||||
|
||||
@ -953,7 +953,7 @@ class Setup extends DolibarrApi
|
||||
$includecustom=(empty($xml->dolibarr_htdocs_dir[0]['includecustom'])?0:$xml->dolibarr_htdocs_dir[0]['includecustom']);
|
||||
|
||||
// Defined qualified files (must be same than into generate_filelist_xml.php)
|
||||
$regextoinclude='\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$';
|
||||
$regextoinclude='\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|bak|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$';
|
||||
$regextoexclude='('.($includecustom?'':'custom|').'documents|conf|install|public\/test|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
|
||||
$scanfiles = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude);
|
||||
|
||||
|
||||
@ -1082,7 +1082,7 @@ if (! $error && $massaction == 'validate' && $permtocreate)
|
||||
{
|
||||
$objecttmp=new $objectclass($db);
|
||||
|
||||
if ($objecttmp->element == 'invoice' && ! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_BILL))
|
||||
if (($objecttmp->element == 'facture' || $objecttmp->element == 'invoice') && ! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_BILL))
|
||||
{
|
||||
$langs->load("errors");
|
||||
setEventMessages($langs->trans('ErrorMassValidationNotAllowedWhenStockIncreaseOnAction'), null, 'errors');
|
||||
|
||||
@ -509,7 +509,7 @@ abstract class CommonObject
|
||||
$this->country =$tmparray['label'];
|
||||
}
|
||||
|
||||
if ($withregion && $this->state_id && (empty($this->state_code) || empty($this->state) || empty($this->region) || empty($this->region_cpde)))
|
||||
if ($withregion && $this->state_id && (empty($this->state_code) || empty($this->state) || empty($this->region) || empty($this->region_code)))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT .'/core/lib/company.lib.php';
|
||||
$tmparray=getState($this->state_id,'all',0,1);
|
||||
@ -1816,7 +1816,7 @@ abstract class CommonObject
|
||||
*/
|
||||
function setMulticurrencyCode($code)
|
||||
{
|
||||
dol_syslog(get_class($this).'::setMulticurrencyCode('.$id.')');
|
||||
dol_syslog(get_class($this).'::setMulticurrencyCode('.$code.')');
|
||||
if ($this->statut >= 0 || $this->element == 'societe')
|
||||
{
|
||||
$fieldname = 'multicurrency_code';
|
||||
@ -1858,7 +1858,7 @@ abstract class CommonObject
|
||||
*/
|
||||
function setMulticurrencyRate($rate, $mode=1)
|
||||
{
|
||||
dol_syslog(get_class($this).'::setMulticurrencyRate('.$id.')');
|
||||
dol_syslog(get_class($this).'::setMulticurrencyRate('.$rate.','.$mode.')');
|
||||
if ($this->statut >= 0 || $this->element == 'societe')
|
||||
{
|
||||
$fieldname = 'multicurrency_tx';
|
||||
|
||||
@ -956,18 +956,18 @@ function dol_unescapefile($filename)
|
||||
*/
|
||||
function dolCheckVirus($src_file)
|
||||
{
|
||||
global $conf;
|
||||
global $conf, $db;
|
||||
|
||||
if (! empty($conf->global->MAIN_ANTIVIRUS_COMMAND))
|
||||
{
|
||||
if (! class_exists('AntiVir')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/antivir.class.php';
|
||||
}
|
||||
$antivir=new AntiVir($db);
|
||||
$antivir = new AntiVir($db);
|
||||
$result = $antivir->dol_avscan_file($src_file);
|
||||
if ($result < 0) // If virus or error, we stop here
|
||||
{
|
||||
$reterrors=$antivir->errors;
|
||||
$reterrors = $antivir->errors;
|
||||
return $reterrors;
|
||||
}
|
||||
}
|
||||
@ -990,7 +990,7 @@ function dolCheckVirus($src_file)
|
||||
* @param integer $uploaderrorcode Value of PHP upload error code ($_FILES['field']['error'])
|
||||
* @param int $nohook Disable all hooks
|
||||
* @param string $varfiles _FILES var name
|
||||
* @return int >0 if OK, <0 or string if KO
|
||||
* @return int|string >0 if OK, <0 or string if KO
|
||||
* @see dol_move
|
||||
*/
|
||||
function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disablevirusscan=0, $uploaderrorcode=0, $nohook=0, $varfiles='addedfile')
|
||||
|
||||
@ -699,7 +699,7 @@ if (empty($reshook))
|
||||
if ($lines[$i]->entrepot_id > 0)
|
||||
{
|
||||
// single warehouse shipment line
|
||||
if ($lines[i]->entrepot_id == $lotStock->warehouseid)
|
||||
if ($lines[$i]->entrepot_id == $lotStock->warehouseid)
|
||||
{
|
||||
$lineIdToAddLot = $line_id;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user