Merge remote-tracking branch 'upstream/develop' into zapieruser
This commit is contained in:
commit
e52b79d586
@ -7,7 +7,7 @@
|
|||||||
* Copyright (C) 2009-2017 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2009-2017 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2015-2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2015-2020 Frédéric France <frederic.france@netlogic.fr>
|
||||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2018-2019 Thibault FOUCART <support@ptibogxiv.net>
|
* Copyright (C) 2018-2019 Thibault FOUCART <support@ptibogxiv.net>
|
||||||
@ -60,6 +60,9 @@ class Adherent extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public $ismultientitymanaged = 1;
|
public $ismultientitymanaged = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string picto
|
||||||
|
*/
|
||||||
public $picto = 'member';
|
public $picto = 'member';
|
||||||
|
|
||||||
|
|
||||||
@ -70,13 +73,19 @@ class Adherent extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public $login;
|
public $login;
|
||||||
|
|
||||||
//! Clear password in memory
|
/**
|
||||||
|
* @var Clear password in memory
|
||||||
|
*/
|
||||||
public $pass;
|
public $pass;
|
||||||
|
|
||||||
//! Clear password in database (defined if DATABASE_PWD_ENCRYPTED=0)
|
/**
|
||||||
|
* @var Clear password in database (defined if DATABASE_PWD_ENCRYPTED=0)
|
||||||
|
*/
|
||||||
public $pass_indatabase;
|
public $pass_indatabase;
|
||||||
|
|
||||||
//! Encrypted password in database (always defined)
|
/**
|
||||||
|
* @var Encrypted password in database (always defined)
|
||||||
|
*/
|
||||||
public $pass_indatabase_crypted;
|
public $pass_indatabase_crypted;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -169,6 +178,11 @@ class Adherent extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public $phone_perso;
|
public $phone_perso;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Professional Phone number
|
||||||
|
*/
|
||||||
|
public $phone_pro;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Mobile phone number
|
* @var string Mobile phone number
|
||||||
*/
|
*/
|
||||||
@ -184,6 +198,9 @@ class Adherent extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public $poste;
|
public $poste;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string mor or phy
|
||||||
|
*/
|
||||||
public $morphy;
|
public $morphy;
|
||||||
|
|
||||||
public $public;
|
public $public;
|
||||||
@ -191,6 +208,10 @@ class Adherent extends CommonObject
|
|||||||
// -1:brouillon, 0:resilie, >=1:valide,paye
|
// -1:brouillon, 0:resilie, >=1:valide,paye
|
||||||
// def in common object
|
// def in common object
|
||||||
//public $status;
|
//public $status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string photo of member
|
||||||
|
*/
|
||||||
public $photo;
|
public $photo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -209,6 +230,9 @@ class Adherent extends CommonObject
|
|||||||
|
|
||||||
public $datevalid;
|
public $datevalid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string gender
|
||||||
|
*/
|
||||||
public $gender;
|
public $gender;
|
||||||
|
|
||||||
public $birth;
|
public $birth;
|
||||||
@ -258,7 +282,11 @@ class Adherent extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public $entity;
|
public $entity;
|
||||||
|
|
||||||
public $fields = array('rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 10),
|
/**
|
||||||
|
* @var array fields
|
||||||
|
*/
|
||||||
|
public $fields = array(
|
||||||
|
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 10),
|
||||||
'entity' => array('type' => 'integer', 'label' => 'Entity', 'default' => 1, 'enabled' => 1, 'visible' => -2, 'notnull' => 1, 'position' => 15, 'index' => 1),
|
'entity' => array('type' => 'integer', 'label' => 'Entity', 'default' => 1, 'enabled' => 1, 'visible' => -2, 'notnull' => 1, 'position' => 15, 'index' => 1),
|
||||||
'ref_ext' => array('type' => 'varchar(128)', 'label' => 'Ref ext', 'enabled' => 1, 'visible' => 0, 'position' => 20),
|
'ref_ext' => array('type' => 'varchar(128)', 'label' => 'Ref ext', 'enabled' => 1, 'visible' => 0, 'position' => 20),
|
||||||
'civility' => array('type' => 'varchar(6)', 'label' => 'Civility', 'enabled' => 1, 'visible' => -1, 'position' => 25),
|
'civility' => array('type' => 'varchar(6)', 'label' => 'Civility', 'enabled' => 1, 'visible' => -1, 'position' => 25),
|
||||||
@ -296,9 +324,10 @@ class Adherent extends CommonObject
|
|||||||
'fk_user_valid' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserValidation', 'enabled' => 1, 'visible' => -1, 'position' => 190),
|
'fk_user_valid' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserValidation', 'enabled' => 1, 'visible' => -1, 'position' => 190),
|
||||||
'canvas' => array('type' => 'varchar(32)', 'label' => 'Canvas', 'enabled' => 1, 'visible' => -1, 'position' => 195),
|
'canvas' => array('type' => 'varchar(32)', 'label' => 'Canvas', 'enabled' => 1, 'visible' => -1, 'position' => 195),
|
||||||
'statut' => array('type' => 'smallint(6)', 'label' => 'Statut', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 500,
|
'statut' => array('type' => 'smallint(6)', 'label' => 'Statut', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 500,
|
||||||
'arrayofkeyval' => array(0 => 'Draft', 1 => 'Validated', -1 => 'MemberStatusResiliatedShort')),
|
'arrayofkeyval' => array(0 => 'Draft', 1 => 'Validated', -1 => 'MemberStatusResiliatedShort')),
|
||||||
'model_pdf' => array('type' => 'varchar(255)', 'label' => 'Model pdf', 'enabled' => 1, 'visible' => 0, 'position' => 800),
|
'model_pdf' => array('type' => 'varchar(255)', 'label' => 'Model pdf', 'enabled' => 1, 'visible' => 0, 'position' => 800),
|
||||||
'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => 1, 'visible' => -2, 'position' => 805));
|
'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => 1, 'visible' => -2, 'position' => 805)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -407,7 +436,8 @@ class Adherent extends CommonObject
|
|||||||
$infos .= $langs->transnoentities("Public").": ".yn($this->public);
|
$infos .= $langs->transnoentities("Public").": ".yn($this->public);
|
||||||
|
|
||||||
// Substitutions
|
// Substitutions
|
||||||
$substitutionarray = array('__ID__' => $this->id, '__MEMBER_ID__' => $this->id, '__CIVILITY__' => $this->getCivilityLabel(),
|
$substitutionarray = array(
|
||||||
|
'__ID__' => $this->id, '__MEMBER_ID__' => $this->id, '__CIVILITY__' => $this->getCivilityLabel(),
|
||||||
'__FIRSTNAME__' => $msgishtml ? dol_htmlentitiesbr($this->firstname) : ($this->firstname ? $this->firstname : ''),
|
'__FIRSTNAME__' => $msgishtml ? dol_htmlentitiesbr($this->firstname) : ($this->firstname ? $this->firstname : ''),
|
||||||
'__LASTNAME__' => $msgishtml ? dol_htmlentitiesbr($this->lastname) : ($this->lastname ? $this->lastname : ''),
|
'__LASTNAME__' => $msgishtml ? dol_htmlentitiesbr($this->lastname) : ($this->lastname ? $this->lastname : ''),
|
||||||
'__FULLNAME__' => $msgishtml ? dol_htmlentitiesbr($this->getFullName($langs)) : $this->getFullName($langs),
|
'__FULLNAME__' => $msgishtml ? dol_htmlentitiesbr($this->getFullName($langs)) : $this->getFullName($langs),
|
||||||
@ -422,7 +452,8 @@ class Adherent extends CommonObject
|
|||||||
'__PHONE__' => $msgishtml ? dol_htmlentitiesbr($this->phone) : ($this->phone ? $this->phone : ''),
|
'__PHONE__' => $msgishtml ? dol_htmlentitiesbr($this->phone) : ($this->phone ? $this->phone : ''),
|
||||||
'__PHONEPRO__' => $msgishtml ? dol_htmlentitiesbr($this->phone_perso) : ($this->phone_perso ? $this->phone_perso : ''),
|
'__PHONEPRO__' => $msgishtml ? dol_htmlentitiesbr($this->phone_perso) : ($this->phone_perso ? $this->phone_perso : ''),
|
||||||
'__PHONEMOBILE__' => $msgishtml ? dol_htmlentitiesbr($this->phone_mobile) : ($this->phone_mobile ? $this->phone_mobile : ''),
|
'__PHONEMOBILE__' => $msgishtml ? dol_htmlentitiesbr($this->phone_mobile) : ($this->phone_mobile ? $this->phone_mobile : ''),
|
||||||
'__TYPE__' => $msgishtml ? dol_htmlentitiesbr($this->type) : ($this->type ? $this->type : ''));
|
'__TYPE__' => $msgishtml ? dol_htmlentitiesbr($this->type) : ($this->type ? $this->type : '')
|
||||||
|
);
|
||||||
|
|
||||||
complete_substitutions_array($substitutionarray, $langs, $this);
|
complete_substitutions_array($substitutionarray, $langs, $this);
|
||||||
|
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
/* Copyright (C) 2016 Xebax Christy <xebax@wanadoo.fr>
|
/* Copyright (C) 2016 Xebax Christy <xebax@wanadoo.fr>
|
||||||
* Copyright (C) 2017 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2017 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2020 Thibault FOUCART<support@ptibogxiv.net>
|
* Copyright (C) 2020 Thibault FOUCART<support@ptibogxiv.net>
|
||||||
|
* Copyright (C) 2020 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
|
||||||
@ -87,9 +88,9 @@ class Members extends DolibarrApi
|
|||||||
*
|
*
|
||||||
* Return an array with member informations
|
* Return an array with member informations
|
||||||
*
|
*
|
||||||
* @param int $thirdparty ID of third party
|
* @param int $thirdparty ID of third party
|
||||||
*
|
*
|
||||||
* @return array|mixed Data without useless information
|
* @return Object Data without useless information
|
||||||
*
|
*
|
||||||
* @url GET thirdparty/{thirdparty}
|
* @url GET thirdparty/{thirdparty}
|
||||||
*
|
*
|
||||||
@ -122,7 +123,7 @@ class Members extends DolibarrApi
|
|||||||
*
|
*
|
||||||
* @param string $email Email of third party
|
* @param string $email Email of third party
|
||||||
*
|
*
|
||||||
* @return array|mixed Data without useless information
|
* @return Object Data without useless information
|
||||||
*
|
*
|
||||||
* @url GET thirdparty/email/{email}
|
* @url GET thirdparty/email/{email}
|
||||||
*
|
*
|
||||||
@ -159,9 +160,9 @@ class Members extends DolibarrApi
|
|||||||
*
|
*
|
||||||
* Return an array with member informations
|
* Return an array with member informations
|
||||||
*
|
*
|
||||||
* @param string $barcode Barcode of third party
|
* @param string $barcode Barcode of third party
|
||||||
*
|
*
|
||||||
* @return array|mixed Data without useless information
|
* @return Object Data without useless information
|
||||||
*
|
*
|
||||||
* @url GET thirdparty/barcode/{barcode}
|
* @url GET thirdparty/barcode/{barcode}
|
||||||
*
|
*
|
||||||
@ -305,7 +306,7 @@ class Members extends DolibarrApi
|
|||||||
*
|
*
|
||||||
* @param int $id ID of member to update
|
* @param int $id ID of member to update
|
||||||
* @param array $request_data Datas
|
* @param array $request_data Datas
|
||||||
* @return int
|
* @return Object Updated object
|
||||||
*/
|
*/
|
||||||
public function put($id, $request_data = null)
|
public function put($id, $request_data = null)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2020 Tobias Sekan <tobias.sekan@startmail.com>
|
* Copyright (C) 2020 Tobias Sekan <tobias.sekan@startmail.com>
|
||||||
|
* Copyright (C) 2020 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
|
||||||
@ -39,8 +40,7 @@ $result = restrictedArea($user, 'adherent', $id, '', '', 'socid', 'rowid', $objc
|
|||||||
|
|
||||||
|
|
||||||
$result = $adherent->fetch($id);
|
$result = $adherent->fetch($id);
|
||||||
if ($result <= 0)
|
if ($result <= 0) {
|
||||||
{
|
|
||||||
dol_print_error($adherent->error);
|
dol_print_error($adherent->error);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@ -48,8 +48,7 @@ if ($result <= 0)
|
|||||||
$physicalperson = 1;
|
$physicalperson = 1;
|
||||||
|
|
||||||
$company = new Societe($db);
|
$company = new Societe($db);
|
||||||
if ($adherent->socid)
|
if ($adherent->socid) {
|
||||||
{
|
|
||||||
$result = $company->fetch($adherent->socid);
|
$result = $company->fetch($adherent->socid);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,37 +71,35 @@ $v->setAddress("", "", $adherent->address, $adherent->town, $adherent->state, $a
|
|||||||
$v->setLabel("", "", $adherent->address, $adherent->town, $adherent->state, $adherent->zip, $country, "TYPE=WORK");
|
$v->setLabel("", "", $adherent->address, $adherent->town, $adherent->state, $adherent->zip, $country, "TYPE=WORK");
|
||||||
|
|
||||||
$v->setEmail($adherent->email);
|
$v->setEmail($adherent->email);
|
||||||
$v->setNote($adherent->note);
|
$v->setNote($adherent->note_public);
|
||||||
$v->setTitle($adherent->poste);
|
$v->setTitle($adherent->poste);
|
||||||
|
|
||||||
// Data from linked company
|
// Data from linked company
|
||||||
if ($company->id)
|
if ($company->id) {
|
||||||
{
|
|
||||||
$v->setURL($company->url, "TYPE=WORK");
|
$v->setURL($company->url, "TYPE=WORK");
|
||||||
if (!$adherent->phone_pro) $v->setPhoneNumber($company->phone, "TYPE=WORK;VOICE");
|
if (!$adherent->phone_pro) {
|
||||||
if (!$adherent->fax) $v->setPhoneNumber($company->fax, "TYPE=WORK;FAX");
|
$v->setPhoneNumber($company->phone, "TYPE=WORK;VOICE");
|
||||||
if (!$adherent->zip) $v->setAddress("", "", $company->address, $company->town, $company->state, $company->zip, $company->country, "TYPE=WORK;POSTAL");
|
}
|
||||||
|
if (!$adherent->fax) {
|
||||||
|
$v->setPhoneNumber($company->fax, "TYPE=WORK;FAX");
|
||||||
|
}
|
||||||
|
if (!$adherent->zip) {
|
||||||
|
$v->setAddress("", "", $company->address, $company->town, $company->state, $company->zip, $company->country, "TYPE=WORK;POSTAL");
|
||||||
|
}
|
||||||
// when company e-mail is empty, use only adherent e-mail
|
// when company e-mail is empty, use only adherent e-mail
|
||||||
if (empty(trim($company->email)))
|
if (empty(trim($company->email))) {
|
||||||
{
|
|
||||||
// was set before, don't set twice
|
// was set before, don't set twice
|
||||||
}
|
} elseif (empty(trim($adherent->email))) {
|
||||||
// when adherent e-mail is empty, use only company e-mail
|
// when adherent e-mail is empty, use only company e-mail
|
||||||
elseif (empty(trim($adherent->email)))
|
|
||||||
{
|
|
||||||
$v->setEmail($company->email);
|
$v->setEmail($company->email);
|
||||||
}
|
} elseif (strtolower(end(explode("@", $adherent->email))) == strtolower(end(explode("@", $company->email)))) {
|
||||||
// when e-mail domain of adherent and company are the same, use adherent e-mail at first (and company e-mail at second)
|
// when e-mail domain of adherent and company are the same, use adherent e-mail at first (and company e-mail at second)
|
||||||
elseif (strtolower(end(explode("@", $adherent->email))) == strtolower(end(explode("@", $company->email))))
|
|
||||||
{
|
|
||||||
$v->setEmail($adherent->email);
|
$v->setEmail($adherent->email);
|
||||||
|
|
||||||
// support by Microsoft Outlook (2019 and possible earlier)
|
// support by Microsoft Outlook (2019 and possible earlier)
|
||||||
$v->setEmail($company->email, 'INTERNET');
|
$v->setEmail($company->email, 'INTERNET');
|
||||||
}
|
} else {
|
||||||
// when e-mail of adherent and company complete different use company e-mail at first (and adherent e-mail at second)
|
// when e-mail of adherent and company complete different use company e-mail at first (and adherent e-mail at second)
|
||||||
else {
|
|
||||||
$v->setEmail($company->email);
|
$v->setEmail($company->email);
|
||||||
|
|
||||||
// support by Microsoft Outlook (2019 and possible earlier)
|
// support by Microsoft Outlook (2019 and possible earlier)
|
||||||
@ -115,7 +112,9 @@ if ($company->id)
|
|||||||
|
|
||||||
// Personal informations
|
// Personal informations
|
||||||
$v->setPhoneNumber($adherent->phone_perso, "TYPE=HOME;VOICE");
|
$v->setPhoneNumber($adherent->phone_perso, "TYPE=HOME;VOICE");
|
||||||
if ($adherent->birthday) $v->setBirthday($adherent->birthday);
|
if ($adherent->birth) {
|
||||||
|
$v->setBirthday($adherent->birth);
|
||||||
|
}
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
|
|||||||
@ -270,13 +270,13 @@ print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// sort list
|
// sort list
|
||||||
if ($sortfield == "name" && $sortorder == "asc") usort($moduleList, function(stdClass $a, stdClass $b) {
|
if ($sortfield == "name" && $sortorder == "asc") usort($moduleList, function (stdClass $a, stdClass $b) {
|
||||||
return strcasecmp($a->name, $b->name); });
|
return strcasecmp($a->name, $b->name); });
|
||||||
if ($sortfield == "name" && $sortorder == "desc") usort($moduleList, function(stdClass $a, stdClass $b) {
|
if ($sortfield == "name" && $sortorder == "desc") usort($moduleList, function (stdClass $a, stdClass $b) {
|
||||||
return strcasecmp($b->name, $a->name); });
|
return strcasecmp($b->name, $a->name); });
|
||||||
if ($sortfield == "version" && $sortorder == "asc") usort($moduleList, function(stdClass $a, stdClass $b) {
|
if ($sortfield == "version" && $sortorder == "asc") usort($moduleList, function (stdClass $a, stdClass $b) {
|
||||||
return strcasecmp($a->version, $b->version); });
|
return strcasecmp($a->version, $b->version); });
|
||||||
if ($sortfield == "version" && $sortorder == "desc") usort($moduleList, function(stdClass $a, stdClass $b) {
|
if ($sortfield == "version" && $sortorder == "desc") usort($moduleList, function (stdClass $a, stdClass $b) {
|
||||||
return strcasecmp($b->version, $a->version); });
|
return strcasecmp($b->version, $a->version); });
|
||||||
if ($sortfield == "id" && $sortorder == "asc") usort($moduleList, "compareIdAsc");
|
if ($sortfield == "id" && $sortorder == "asc") usort($moduleList, "compareIdAsc");
|
||||||
if ($sortfield == "id" && $sortorder == "desc") usort($moduleList, "compareIdDesc");
|
if ($sortfield == "id" && $sortorder == "desc") usort($moduleList, "compareIdDesc");
|
||||||
|
|||||||
@ -139,7 +139,7 @@ if (!empty($conf->modules_parts['workflow']) && is_array($conf->modules_parts['w
|
|||||||
}
|
}
|
||||||
|
|
||||||
// remove not available workflows (based on activated modules and global defined keys)
|
// remove not available workflows (based on activated modules and global defined keys)
|
||||||
$workflowcodes = array_filter($workflowcodes, function($var) {
|
$workflowcodes = array_filter($workflowcodes, function ($var) {
|
||||||
return $var['enabled']; });
|
return $var['enabled']; });
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
// Create the autoloader for Luracast
|
// Create the autoloader for Luracast
|
||||||
require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/AutoLoader.php';
|
require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/AutoLoader.php';
|
||||||
call_user_func(function() {
|
call_user_func(function () {
|
||||||
$loader = Luracast\Restler\AutoLoader::instance();
|
$loader = Luracast\Restler\AutoLoader::instance();
|
||||||
spl_autoload_register($loader);
|
spl_autoload_register($loader);
|
||||||
return $loader;
|
return $loader;
|
||||||
|
|||||||
@ -45,7 +45,7 @@ if (!$res) die("Include of main fails");
|
|||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/AutoLoader.php';
|
require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/AutoLoader.php';
|
||||||
|
|
||||||
call_user_func(function() {
|
call_user_func(function () {
|
||||||
$loader = Luracast\Restler\AutoLoader::instance();
|
$loader = Luracast\Restler\AutoLoader::instance();
|
||||||
spl_autoload_register($loader);
|
spl_autoload_register($loader);
|
||||||
return $loader;
|
return $loader;
|
||||||
|
|||||||
@ -1288,7 +1288,7 @@ abstract class CommonDocGenerator
|
|||||||
if (!empty($fields))
|
if (!empty($fields))
|
||||||
{
|
{
|
||||||
// Sort extrafields by rank
|
// Sort extrafields by rank
|
||||||
uasort($fields, function($a, $b) {
|
uasort($fields, function ($a, $b) {
|
||||||
return ($a->rank > $b->rank) ? 1 : -1;
|
return ($a->rank > $b->rank) ? 1 : -1;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -92,10 +92,13 @@ class DolGeoIP
|
|||||||
} elseif (function_exists('geoip_open'))
|
} elseif (function_exists('geoip_open'))
|
||||||
{
|
{
|
||||||
$this->gi = geoip_open($datfile, GEOIP_STANDARD);
|
$this->gi = geoip_open($datfile, GEOIP_STANDARD);
|
||||||
} else {
|
}
|
||||||
|
elseif (function_exists('geoip_country_code_by_name')) {
|
||||||
$this->gi = 'NOGI'; // We are using embedded php geoip functions
|
$this->gi = 'NOGI'; // We are using embedded php geoip functions
|
||||||
//print 'function_exists(geoip_country_code_by_name))='.function_exists('geoip_country_code_by_name');
|
//print 'function_exists(geoip_country_code_by_name))='.function_exists('geoip_country_code_by_name');
|
||||||
//print geoip_database_info();
|
//print geoip_database_info();
|
||||||
|
} else {
|
||||||
|
$this->gi = ''; // For avoid error
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -82,7 +82,7 @@ $tmpDir = $conf->dav->multidir_output[$entity]; // We need root dir, not a dir t
|
|||||||
|
|
||||||
|
|
||||||
// Authentication callback function
|
// Authentication callback function
|
||||||
$authBackend = new \Sabre\DAV\Auth\Backend\BasicCallBack(function($username, $password) {
|
$authBackend = new \Sabre\DAV\Auth\Backend\BasicCallBack(function ($username, $password) {
|
||||||
global $user;
|
global $user;
|
||||||
global $conf;
|
global $conf;
|
||||||
global $dolibarr_main_authentication, $dolibarr_auto_user;
|
global $dolibarr_main_authentication, $dolibarr_auto_user;
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* Simple autoloader, so we don't need Composer just for this.
|
* Simple autoloader, so we don't need Composer just for this.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
spl_autoload_register(function($class) {
|
spl_autoload_register(function ($class) {
|
||||||
if (preg_match('/^DebugBar/', $class)) {
|
if (preg_match('/^DebugBar/', $class)) {
|
||||||
$file = DOL_DOCUMENT_ROOT.'/includes/maximebf/debugbar/src/'.str_replace('\\', DIRECTORY_SEPARATOR, $class).'.php';
|
$file = DOL_DOCUMENT_ROOT.'/includes/maximebf/debugbar/src/'.str_replace('\\', DIRECTORY_SEPARATOR, $class).'.php';
|
||||||
//var_dump($class.' - '.file_exists($file).' - '.$file);
|
//var_dump($class.' - '.file_exists($file).' - '.$file);
|
||||||
|
|||||||
@ -141,7 +141,7 @@ for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) {
|
|||||||
$price_options[$i] = $langs->trans('SellingPrice').' '.$i;
|
$price_options[$i] = $langs->trans('SellingPrice').' '.$i;
|
||||||
}
|
}
|
||||||
|
|
||||||
$genPriceOptions = function($level) use ($price_options) {
|
$genPriceOptions = function ($level) use ($price_options) {
|
||||||
|
|
||||||
$return = array();
|
$return = array();
|
||||||
|
|
||||||
|
|||||||
@ -300,7 +300,7 @@ class Users extends DolibarrApi
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($this->useraccount->create(DolibarrApiAccess::$user) < 0) {
|
if ($this->useraccount->create(DolibarrApiAccess::$user) < 0) {
|
||||||
throw new RestException(500, 'Error creating', array_merge(array($this->useraccount->error), $this->useraccount->errors));
|
throw new RestException(500, 'Error creating', array_merge(array($this->useraccount->error), $this->useraccount->errors));
|
||||||
}
|
}
|
||||||
return $this->useraccount->id;
|
return $this->useraccount->id;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user