Skip to content

Commit

Permalink
Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Browse files Browse the repository at this point in the history
Conflicts:
	htdocs/admin/system/filecheck.php
  • Loading branch information
eldy committed Dec 14, 2019
2 parents 63a26ed + 9f2a628 commit a8de7b8
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions build/generate_filelist_xml.php
Expand Up @@ -72,7 +72,7 @@

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;
}
Expand Down Expand Up @@ -164,7 +164,7 @@
// 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='';
Expand Down
4 changes: 2 additions & 2 deletions htdocs/admin/system/filecheck.php
Expand Up @@ -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
Expand Down Expand Up @@ -214,7 +214,7 @@
$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);

Expand Down
2 changes: 1 addition & 1 deletion htdocs/api/class/api_setup.class.php
Expand Up @@ -953,7 +953,7 @@ function getCheckIntegrity($target)
$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);

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/actions_massactions.inc.php
Expand Up @@ -1082,7 +1082,7 @@
{
$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');
Expand Down
6 changes: 3 additions & 3 deletions htdocs/core/class/commonobject.class.php
Expand Up @@ -509,7 +509,7 @@ function getFullAddress($withcountry=0, $sep="\n", $withregion=0)
$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);
Expand Down Expand Up @@ -1816,7 +1816,7 @@ function setPaymentMethods($id)
*/
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';
Expand Down Expand Up @@ -1858,7 +1858,7 @@ function setMulticurrencyCode($code)
*/
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';
Expand Down
8 changes: 4 additions & 4 deletions htdocs/core/lib/files.lib.php
Expand Up @@ -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;
}
}
Expand All @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion htdocs/expedition/card.php
Expand Up @@ -699,7 +699,7 @@
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;
}
Expand Down

0 comments on commit a8de7b8

Please sign in to comment.