Merge branch '3.2' of https://github.com/Dolibarr/dolibarr.git into 3.2
This commit is contained in:
commit
2b9f4fed8d
@ -61,6 +61,7 @@ if ($id || $ref)
|
|||||||
$elementtype = 'fournisseur';
|
$elementtype = 'fournisseur';
|
||||||
$objecttype = 'societe&categorie';
|
$objecttype = 'societe&categorie';
|
||||||
$objectid = isset($id)?$id:(isset($socid)?$socid:'');
|
$objectid = isset($id)?$id:(isset($socid)?$socid:'');
|
||||||
|
$dbtablename = '&societe';
|
||||||
$fieldid = 'rowid';
|
$fieldid = 'rowid';
|
||||||
}
|
}
|
||||||
if ($type == 2) {
|
if ($type == 2) {
|
||||||
|
|||||||
@ -59,13 +59,14 @@ class FormFile
|
|||||||
* @param int $size Length of input file area
|
* @param int $size Length of input file area
|
||||||
* @param Object $object Object to use (when attachment is done on an element)
|
* @param Object $object Object to use (when attachment is done on an element)
|
||||||
* @param string $options Options
|
* @param string $options Options
|
||||||
|
* @param boolean $useajax Use ajax if enabled
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function form_attach_new_file($url, $title='', $addcancel=0, $sectionid=0, $perm=1, $size=50, $object='', $options='')
|
function form_attach_new_file($url, $title='', $addcancel=0, $sectionid=0, $perm=1, $size=50, $object='', $options='', $useajax=true)
|
||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
if ($conf->global->MAIN_USE_JQUERY_FILEUPLOAD)
|
if (! empty($conf->global->MAIN_USE_JQUERY_FILEUPLOAD) && $useajax)
|
||||||
{
|
{
|
||||||
return $this->_formAjaxFileUpload($object);
|
return $this->_formAjaxFileUpload($object);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,7 +44,7 @@ $action = GETPOST('action');
|
|||||||
// Security check
|
// Security check
|
||||||
$id = (GETPOST('socid','int') ? GETPOST('socid','int') : GETPOST('id','int'));
|
$id = (GETPOST('socid','int') ? GETPOST('socid','int') : GETPOST('id','int'));
|
||||||
if ($user->societe_id) $id=$user->societe_id;
|
if ($user->societe_id) $id=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'societe&fournisseur', $id, '');
|
$result = restrictedArea($user, 'societe&fournisseur', $id, '&societe');
|
||||||
|
|
||||||
$object = new Fournisseur($db);
|
$object = new Fournisseur($db);
|
||||||
|
|
||||||
@ -403,7 +403,7 @@ if ($object->fetch($id))
|
|||||||
// List of contacts
|
// List of contacts
|
||||||
show_contacts($conf,$langs,$db,$object,$_SERVER["PHP_SELF"].'?id='.$object->id);
|
show_contacts($conf,$langs,$db,$object,$_SERVER["PHP_SELF"].'?id='.$object->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Addresses list
|
// Addresses list
|
||||||
if (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) && ! empty($conf->global->MAIN_REPEATADDRESSONEACHTAB))
|
if (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) && ! empty($conf->global->MAIN_REPEATADDRESSONEACHTAB))
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user