Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
4a71374cf7
@ -115,16 +115,16 @@ function getDoliDBInstance($type, $host, $user, $pass, $name, $port)
|
|||||||
* 'c_paiement', 'c_payment_term', ...
|
* 'c_paiement', 'c_payment_term', ...
|
||||||
* @param int $shared 0=Return id of current entity only,
|
* @param int $shared 0=Return id of current entity only,
|
||||||
* 1=Return id of current entity + shared entities (default)
|
* 1=Return id of current entity + shared entities (default)
|
||||||
* @param int $forceentity Entity id
|
* @param object $currentobject Current object if needed
|
||||||
* @return mixed Entity id(s) to use
|
* @return mixed Entity id(s) to use
|
||||||
*/
|
*/
|
||||||
function getEntity($element, $shared=1, $forceentity=null)
|
function getEntity($element, $shared=1, $currentobject=null)
|
||||||
{
|
{
|
||||||
global $conf, $mc;
|
global $conf, $mc;
|
||||||
|
|
||||||
if (is_object($mc))
|
if (is_object($mc))
|
||||||
{
|
{
|
||||||
return $mc->getEntity($element, $shared, $forceentity);
|
return $mc->getEntity($element, $shared, $currentobject);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@zendsi.com>
|
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||||
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||||
|
* Copyright (c) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -1521,8 +1522,7 @@ class ExpenseReport extends CommonObject
|
|||||||
$mybool|=@include_once $dir.$file;
|
$mybool|=@include_once $dir.$file;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $mybool)
|
if ($mybool === false) {
|
||||||
{
|
|
||||||
dol_print_error('', "Failed to include file ".$file);
|
dol_print_error('', "Failed to include file ".$file);
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2015 Charlie Benke <charlie@patas-monkey.com>
|
* Copyright (C) 2015 Charlie Benke <charlie@patas-monkey.com>
|
||||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -805,8 +806,7 @@ class Fichinter extends CommonObject
|
|||||||
$mybool|=@include_once $dir.$file;
|
$mybool|=@include_once $dir.$file;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $mybool)
|
if ($mybool === false) {
|
||||||
{
|
|
||||||
dol_print_error('', "Failed to include file ".$file);
|
dol_print_error('', "Failed to include file ".$file);
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -800,8 +801,7 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
$mybool|=@include_once $dir.$file;
|
$mybool|=@include_once $dir.$file;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $mybool)
|
if ($mybool === false) {
|
||||||
{
|
|
||||||
dol_print_error('',"Failed to include file ".$file);
|
dol_print_error('',"Failed to include file ".$file);
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,6 +12,7 @@
|
|||||||
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
* Copyright (C) 2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -2280,8 +2281,7 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
$mybool|=@include_once $dir.$file;
|
$mybool|=@include_once $dir.$file;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $mybool)
|
if ($mybool === false) {
|
||||||
{
|
|
||||||
dol_print_error('', "Failed to include file ".$file);
|
dol_print_error('', "Failed to include file ".$file);
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.francenetlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -654,14 +655,12 @@ class PaiementFourn extends Paiement
|
|||||||
}
|
}
|
||||||
|
|
||||||
// For compatibility
|
// For compatibility
|
||||||
if (! $mybool)
|
if ($mybool === false) {
|
||||||
{
|
|
||||||
$file = $conf->global->SUPPLIER_PAYMENT_ADDON.".php";
|
$file = $conf->global->SUPPLIER_PAYMENT_ADDON.".php";
|
||||||
$classname = "mod_supplier_payment_".$conf->global->SUPPLIER_PAYMENT_ADDON;
|
$classname = "mod_supplier_payment_".$conf->global->SUPPLIER_PAYMENT_ADDON;
|
||||||
$classname = preg_replace('/\-.*$/','',$classname);
|
$classname = preg_replace('/\-.*$/','',$classname);
|
||||||
// Include file with class
|
// Include file with class
|
||||||
foreach ($conf->file->dol_document_root as $dirroot)
|
foreach ($conf->file->dol_document_root as $dirroot) {
|
||||||
{
|
|
||||||
$dir = $dirroot."/core/modules/supplier_payment/";
|
$dir = $dirroot."/core/modules/supplier_payment/";
|
||||||
|
|
||||||
// Load file with numbering class (if found)
|
// Load file with numbering class (if found)
|
||||||
@ -671,8 +670,7 @@ class PaiementFourn extends Paiement
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $mybool)
|
if ($mybool === false) {
|
||||||
{
|
|
||||||
dol_print_error('',"Failed to include file ".$file);
|
dol_print_error('',"Failed to include file ".$file);
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user