Merge branch '3.7' of git@github.com:Dolibarr/dolibarr.git into 3.7
This commit is contained in:
commit
ec89f00103
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2011-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
/* Copyright (C) 2011-2015 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -26,6 +26,7 @@ if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1');
|
|||||||
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
||||||
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
|
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
|
||||||
if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1');
|
if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1');
|
||||||
|
if (! defined('NOREQUIREHOOK')) define('NOREQUIREHOOK','1');
|
||||||
|
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
|
|||||||
@ -1412,7 +1412,6 @@ abstract class DolibarrModules
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$error=0;
|
$error=0;
|
||||||
$entity=$conf->entity;
|
|
||||||
|
|
||||||
if (is_array($this->module_parts) && ! empty($this->module_parts))
|
if (is_array($this->module_parts) && ! empty($this->module_parts))
|
||||||
{
|
{
|
||||||
@ -1420,6 +1419,7 @@ abstract class DolibarrModules
|
|||||||
{
|
{
|
||||||
if (is_array($value) && count($value) == 0) continue; // Discard empty arrays
|
if (is_array($value) && count($value) == 0) continue; // Discard empty arrays
|
||||||
|
|
||||||
|
$entity=$conf->entity; // Reset the current entity
|
||||||
$newvalue = $value;
|
$newvalue = $value;
|
||||||
|
|
||||||
// Serialize array parameters
|
// Serialize array parameters
|
||||||
@ -1431,6 +1431,11 @@ abstract class DolibarrModules
|
|||||||
$newvalue = json_encode($value['data']);
|
$newvalue = json_encode($value['data']);
|
||||||
if (isset($value['entity'])) $entity = $value['entity'];
|
if (isset($value['entity'])) $entity = $value['entity'];
|
||||||
}
|
}
|
||||||
|
else if (isset($value['data']) && !is_array($value['data']))
|
||||||
|
{
|
||||||
|
$newvalue = $value['data'];
|
||||||
|
if (isset($value['entity'])) $entity = $value['entity'];
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$newvalue = json_encode($value);
|
$newvalue = json_encode($value);
|
||||||
|
|||||||
@ -575,7 +575,7 @@ if (! defined('NOLOGIN'))
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||||
$hookmanager->initHooks(array('main'));
|
$hookmanager->initHooks(array('main'));
|
||||||
|
|
||||||
|
|||||||
@ -311,7 +311,7 @@ function getPaypalPaymentUrl($mode,$type,$ref='',$amount='9.99',$freetag='your_f
|
|||||||
}
|
}
|
||||||
|
|
||||||
// For multicompany
|
// For multicompany
|
||||||
//$out.="&entity=".$conf->entity; // This should not be into link. Link contains already a ref of an object that allow to retreive entity
|
$out.="&entity=".$conf->entity; // Check the entity because He may be the same reference in several entities
|
||||||
|
|
||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user