add visibility
This commit is contained in:
parent
8b4e920d5e
commit
d608921f1e
@ -82,7 +82,7 @@ class Fiscalyear extends CommonObject
|
|||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
*/
|
*/
|
||||||
function __construct(DoliDB $db)
|
public function __construct(DoliDB $db)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ class Fiscalyear extends CommonObject
|
|||||||
* @param User $user User making creation
|
* @param User $user User making creation
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function create($user)
|
public function create($user)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -159,7 +159,7 @@ class Fiscalyear extends CommonObject
|
|||||||
* @param User $user User making update
|
* @param User $user User making update
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function update($user)
|
public function update($user)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
@ -203,7 +203,7 @@ class Fiscalyear extends CommonObject
|
|||||||
* @param int $id Id of record to load
|
* @param int $id Id of record to load
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function fetch($id)
|
public function fetch($id)
|
||||||
{
|
{
|
||||||
$sql = "SELECT rowid, label, date_start, date_end, statut";
|
$sql = "SELECT rowid, label, date_start, date_end, statut";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."accounting_fiscalyear";
|
$sql.= " FROM ".MAIN_DB_PREFIX."accounting_fiscalyear";
|
||||||
@ -237,7 +237,7 @@ class Fiscalyear extends CommonObject
|
|||||||
* @param int $id Id of record to delete
|
* @param int $id Id of record to delete
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function delete($id)
|
public function delete($id)
|
||||||
{
|
{
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
@ -264,12 +264,12 @@ class Fiscalyear extends CommonObject
|
|||||||
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
|
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
|
||||||
* @return string Label
|
* @return string Label
|
||||||
*/
|
*/
|
||||||
function getLibStatut($mode = 0)
|
public function getLibStatut($mode = 0)
|
||||||
{
|
{
|
||||||
return $this->LibStatut($this->statut, $mode);
|
return $this->LibStatut($this->statut, $mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Give a label from a status
|
* Give a label from a status
|
||||||
*
|
*
|
||||||
@ -277,7 +277,7 @@ class Fiscalyear extends CommonObject
|
|||||||
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
|
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
|
||||||
* @return string Label
|
* @return string Label
|
||||||
*/
|
*/
|
||||||
function LibStatut($statut, $mode = 0)
|
public function LibStatut($statut, $mode = 0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs;
|
global $langs;
|
||||||
@ -318,7 +318,7 @@ class Fiscalyear extends CommonObject
|
|||||||
* @param int $id Id of record
|
* @param int $id Id of record
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function info($id)
|
public function info($id)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT fy.rowid, fy.datec, fy.fk_user_author, fy.fk_user_modif,';
|
$sql = 'SELECT fy.rowid, fy.datec, fy.fk_user_author, fy.fk_user_modif,';
|
||||||
$sql.= ' fy.tms';
|
$sql.= ' fy.tms';
|
||||||
@ -364,7 +364,7 @@ class Fiscalyear extends CommonObject
|
|||||||
* @param int $dateend Date end to scan
|
* @param int $dateend Date end to scan
|
||||||
* @return string Number of entries
|
* @return string Number of entries
|
||||||
*/
|
*/
|
||||||
function getAccountancyEntriesByFiscalYear($datestart, $dateend)
|
public function getAccountancyEntriesByFiscalYear($datestart, $dateend)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -390,7 +390,7 @@ class Fiscalyear extends CommonObject
|
|||||||
* @param int $dateend Date end to scan
|
* @param int $dateend Date end to scan
|
||||||
* @return string Number of movements
|
* @return string Number of movements
|
||||||
*/
|
*/
|
||||||
function getAccountancyMovementsByFiscalYear($datestart, $dateend)
|
public function getAccountancyMovementsByFiscalYear($datestart, $dateend)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
|||||||
@ -44,7 +44,7 @@ class GoogleAPI
|
|||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
* @param string $key Google key
|
* @param string $key Google key
|
||||||
*/
|
*/
|
||||||
function __construct($db, $key)
|
public function __construct($db, $key)
|
||||||
{
|
{
|
||||||
$this->db=$db;
|
$this->db=$db;
|
||||||
$this->key=$key;
|
$this->key=$key;
|
||||||
@ -59,7 +59,7 @@ class GoogleAPI
|
|||||||
* Example: 188, rue de Fontenay,+94300,+Vincennes,+France
|
* Example: 188, rue de Fontenay,+94300,+Vincennes,+France
|
||||||
* @return string Coordinates
|
* @return string Coordinates
|
||||||
*/
|
*/
|
||||||
function getGeoCoordinatesOfAddress($address)
|
public function getGeoCoordinatesOfAddress($address)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
|||||||
@ -45,24 +45,24 @@ class HookManager
|
|||||||
public $errors = array();
|
public $errors = array();
|
||||||
|
|
||||||
// Context hookmanager was created for ('thirdpartycard', 'thirdpartydao', ...)
|
// Context hookmanager was created for ('thirdpartycard', 'thirdpartydao', ...)
|
||||||
var $contextarray=array();
|
public $contextarray=array();
|
||||||
|
|
||||||
// Array with instantiated classes
|
// Array with instantiated classes
|
||||||
var $hooks=array();
|
public $hooks=array();
|
||||||
|
|
||||||
// Array result
|
// Array result
|
||||||
var $resArray=array();
|
public $resArray=array();
|
||||||
// Printable result
|
// Printable result
|
||||||
var $resPrint='';
|
public $resPrint='';
|
||||||
// Nb of qualified hook ran
|
// Nb of qualified hook ran
|
||||||
var $resNbOfHooks=0;
|
public $resNbOfHooks=0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
*/
|
*/
|
||||||
function __construct($db)
|
public function __construct($db)
|
||||||
{
|
{
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
}
|
}
|
||||||
@ -79,7 +79,7 @@ class HookManager
|
|||||||
* @param string[] $arraycontext Array list of searched hooks tab/features. For example: 'thirdpartycard' (for hook methods into page card thirdparty), 'thirdpartydao' (for hook methods into Societe), ...
|
* @param string[] $arraycontext Array list of searched hooks tab/features. For example: 'thirdpartycard' (for hook methods into page card thirdparty), 'thirdpartydao' (for hook methods into Societe), ...
|
||||||
* @return int Always 1
|
* @return int Always 1
|
||||||
*/
|
*/
|
||||||
function initHooks($arraycontext)
|
public function initHooks($arraycontext)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ class HookManager
|
|||||||
* All types can also return some values into an array ->results that will be finaly merged into this->resArray for caller.
|
* All types can also return some values into an array ->results that will be finaly merged into this->resArray for caller.
|
||||||
* $this->error or this->errors are also defined by class called by this function if error.
|
* $this->error or this->errors are also defined by class called by this function if error.
|
||||||
*/
|
*/
|
||||||
function executeHooks($method, $parameters = array(), &$object = '', &$action = '')
|
public function executeHooks($method, $parameters = array(), &$object = '', &$action = '')
|
||||||
{
|
{
|
||||||
if (! is_array($this->hooks) || empty($this->hooks)) return '';
|
if (! is_array($this->hooks) || empty($this->hooks)) return '';
|
||||||
|
|
||||||
@ -145,7 +145,7 @@ class HookManager
|
|||||||
|
|
||||||
// Define type of hook ('output' or 'addreplace'. 'returnvalue' is deprecated because a 'addreplace' hook can also return resPrint and resArray).
|
// Define type of hook ('output' or 'addreplace'. 'returnvalue' is deprecated because a 'addreplace' hook can also return resPrint and resArray).
|
||||||
$hooktype='output';
|
$hooktype='output';
|
||||||
if (in_array(
|
if (in_array(
|
||||||
$method,
|
$method,
|
||||||
array(
|
array(
|
||||||
'addCalendarChoice',
|
'addCalendarChoice',
|
||||||
@ -204,8 +204,7 @@ if (in_array(
|
|||||||
)
|
)
|
||||||
)) $hooktype='addreplace';
|
)) $hooktype='addreplace';
|
||||||
|
|
||||||
if ($method == 'insertExtraFields')
|
if ($method == 'insertExtraFields') {
|
||||||
{
|
|
||||||
$hooktype='returnvalue'; // @deprecated. TODO Remove all code with "executeHooks('insertExtraFields'" as soon as there is a trigger available.
|
$hooktype='returnvalue'; // @deprecated. TODO Remove all code with "executeHooks('insertExtraFields'" as soon as there is a trigger available.
|
||||||
dol_syslog("Warning: The hook 'insertExtraFields' is deprecated and must not be used. Use instead trigger on CRUD event (ask it to dev team if not implemented)", LOG_WARNING);
|
dol_syslog("Warning: The hook 'insertExtraFields' is deprecated and must not be used. Use instead trigger on CRUD event (ask it to dev team if not implemented)", LOG_WARNING);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
* Copyright (C) 2012-2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2012-2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
* Copyright (C) 2014 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
* Copyright (C) 2014 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||||
* Copyright (C) 2018 Christophe Battarel <christophe@altairis.fr>
|
* Copyright (C) 2018 Christophe Battarel <christophe@altairis.fr>
|
||||||
* Copyright (C) 2018 Josep Lluis Amador <joseplluis@lliuretic.cat>
|
* Copyright (C) 2018 Josep Lluis Amador <joseplluis@lliuretic.cat>
|
||||||
@ -102,7 +102,7 @@ class Form
|
|||||||
* @param string $paramid Key of parameter for id ('id', 'socid')
|
* @param string $paramid Key of parameter for id ('id', 'socid')
|
||||||
* @return string HTML edit field
|
* @return string HTML edit field
|
||||||
*/
|
*/
|
||||||
function editfieldkey($text, $htmlname, $preselected, $object, $perm, $typeofdata = 'string', $moreparam = '', $fieldrequired = 0, $notabletag = 0, $paramid = 'id')
|
public function editfieldkey($text, $htmlname, $preselected, $object, $perm, $typeofdata = 'string', $moreparam = '', $fieldrequired = 0, $notabletag = 0, $paramid = 'id')
|
||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
@ -164,7 +164,7 @@ class Form
|
|||||||
* @param string $paramid Key of parameter for id ('id', 'socid')
|
* @param string $paramid Key of parameter for id ('id', 'socid')
|
||||||
* @return string HTML edit field
|
* @return string HTML edit field
|
||||||
*/
|
*/
|
||||||
function editfieldval($text, $htmlname, $value, $object, $perm, $typeofdata = 'string', $editvalue = '', $extObject = null, $custommsg = null, $moreparam = '', $notabletag = 0, $formatfunc = '', $paramid = 'id')
|
public function editfieldval($text, $htmlname, $value, $object, $perm, $typeofdata = 'string', $editvalue = '', $extObject = null, $custommsg = null, $moreparam = '', $notabletag = 0, $formatfunc = '', $paramid = 'id')
|
||||||
{
|
{
|
||||||
global $conf,$langs,$db;
|
global $conf,$langs,$db;
|
||||||
|
|
||||||
@ -441,7 +441,7 @@ class Form
|
|||||||
* @see Use function textwithpicto if you can.
|
* @see Use function textwithpicto if you can.
|
||||||
* TODO Move this as static as soon as everybody use textwithpicto or @Form::textwithtooltip
|
* TODO Move this as static as soon as everybody use textwithpicto or @Form::textwithtooltip
|
||||||
*/
|
*/
|
||||||
function textwithtooltip($text, $htmltext, $tooltipon = 1, $direction = 0, $img = '', $extracss = '', $notabs = 2, $incbefore = '', $noencodehtmltext = 0, $tooltiptrigger = '', $forcenowrap = 0)
|
public function textwithtooltip($text, $htmltext, $tooltipon = 1, $direction = 0, $img = '', $extracss = '', $notabs = 2, $incbefore = '', $noencodehtmltext = 0, $tooltiptrigger = '', $forcenowrap = 0)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -526,7 +526,7 @@ class Form
|
|||||||
* @param int $forcenowrap Force no wrap between text and picto (works with notabs=2 only)
|
* @param int $forcenowrap Force no wrap between text and picto (works with notabs=2 only)
|
||||||
* @return string HTML code of text, picto, tooltip
|
* @return string HTML code of text, picto, tooltip
|
||||||
*/
|
*/
|
||||||
function textwithpicto($text, $htmltext, $direction = 1, $type = 'help', $extracss = '', $noencodehtmltext = 0, $notabs = 2, $tooltiptrigger = '', $forcenowrap = 0)
|
public function textwithpicto($text, $htmltext, $direction = 1, $type = 'help', $extracss = '', $noencodehtmltext = 0, $notabs = 2, $tooltiptrigger = '', $forcenowrap = 0)
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
@ -578,7 +578,7 @@ class Form
|
|||||||
* @param int $alwaysvisible 1=select button always visible
|
* @param int $alwaysvisible 1=select button always visible
|
||||||
* @return string Select list
|
* @return string Select list
|
||||||
*/
|
*/
|
||||||
function selectMassAction($selected, $arrayofaction, $alwaysvisible = 0)
|
public function selectMassAction($selected, $arrayofaction, $alwaysvisible = 0)
|
||||||
{
|
{
|
||||||
global $conf,$langs,$hookmanager;
|
global $conf,$langs,$hookmanager;
|
||||||
|
|
||||||
@ -663,7 +663,7 @@ class Form
|
|||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return combo list of activated countries, into language of user
|
* Return combo list of activated countries, into language of user
|
||||||
*
|
*
|
||||||
@ -678,7 +678,7 @@ class Form
|
|||||||
* @param int $addspecialentries 1=Add dedicated entries for group of countries (like 'European Economic Community', ...)
|
* @param int $addspecialentries 1=Add dedicated entries for group of countries (like 'European Economic Community', ...)
|
||||||
* @return string HTML string with select
|
* @return string HTML string with select
|
||||||
*/
|
*/
|
||||||
function select_country($selected = '', $htmlname = 'country_id', $htmloption = '', $maxlength = 0, $morecss = 'minwidth300', $usecodeaskey = '', $showempty = 1, $disablefavorites = 0, $addspecialentries = 0)
|
public function select_country($selected = '', $htmlname = 'country_id', $htmloption = '', $maxlength = 0, $morecss = 'minwidth300', $usecodeaskey = '', $showempty = 1, $disablefavorites = 0, $addspecialentries = 0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $conf,$langs,$mysoc;
|
global $conf,$langs,$mysoc;
|
||||||
@ -778,7 +778,7 @@ class Form
|
|||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return select list of incoterms
|
* Return select list of incoterms
|
||||||
*
|
*
|
||||||
@ -791,7 +791,7 @@ class Form
|
|||||||
* @param array $events Event options to run on change. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
|
* @param array $events Event options to run on change. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
|
||||||
* @return string HTML string with select and input
|
* @return string HTML string with select and input
|
||||||
*/
|
*/
|
||||||
function select_incoterms($selected = '', $location_incoterms = '', $page = '', $htmlname = 'incoterm_id', $htmloption = '', $forcecombo = 1, $events = array())
|
public function select_incoterms($selected = '', $location_incoterms = '', $page = '', $htmlname = 'incoterm_id', $htmloption = '', $forcecombo = 1, $events = array())
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
@ -872,7 +872,7 @@ class Form
|
|||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return list of types of lines (product or service)
|
* Return list of types of lines (product or service)
|
||||||
* Example: 0=product, 1=service, 9=other (for external module)
|
* Example: 0=product, 1=service, 9=other (for external module)
|
||||||
@ -884,7 +884,7 @@ class Form
|
|||||||
* @param integer $forceall 1=Force to show products and services in combo list, whatever are activated modules, 0=No force, 2=Force to show only Products, 3=Force to show only services, -1=Force none (and set hidden field to 'service')
|
* @param integer $forceall 1=Force to show products and services in combo list, whatever are activated modules, 0=No force, 2=Force to show only Products, 3=Force to show only services, -1=Force none (and set hidden field to 'service')
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function select_type_of_lines($selected = '', $htmlname = 'type', $showempty = 0, $hidetext = 0, $forceall = 0)
|
public function select_type_of_lines($selected = '', $htmlname = 'type', $showempty = 0, $hidetext = 0, $forceall = 0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $db,$langs,$user,$conf;
|
global $db,$langs,$user,$conf;
|
||||||
@ -929,13 +929,13 @@ class Form
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Load into cache cache_types_fees, array of types of fees
|
* Load into cache cache_types_fees, array of types of fees
|
||||||
*
|
*
|
||||||
* @return int Nb of lines loaded, <0 if KO
|
* @return int Nb of lines loaded, <0 if KO
|
||||||
*/
|
*/
|
||||||
function load_cache_types_fees()
|
public function load_cache_types_fees()
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs;
|
global $langs;
|
||||||
@ -978,7 +978,7 @@ class Form
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return list of types of notes
|
* Return list of types of notes
|
||||||
*
|
*
|
||||||
@ -987,7 +987,7 @@ class Form
|
|||||||
* @param int $showempty Add an empty field
|
* @param int $showempty Add an empty field
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function select_type_fees($selected = '', $htmlname = 'type', $showempty = 0)
|
public function select_type_fees($selected = '', $htmlname = 'type', $showempty = 0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $user, $langs;
|
global $user, $langs;
|
||||||
@ -1018,7 +1018,7 @@ class Form
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return HTML code to select a company.
|
* Return HTML code to select a company.
|
||||||
*
|
*
|
||||||
@ -1031,13 +1031,13 @@ class Form
|
|||||||
* @return string Return select box for thirdparty.
|
* @return string Return select box for thirdparty.
|
||||||
* @deprecated 3.8 Use select_company instead. For exemple $form->select_thirdparty(GETPOST('socid'),'socid','',0) => $form->select_company(GETPOST('socid'),'socid','',1,0,0,array(),0)
|
* @deprecated 3.8 Use select_company instead. For exemple $form->select_thirdparty(GETPOST('socid'),'socid','',0) => $form->select_company(GETPOST('socid'),'socid','',1,0,0,array(),0)
|
||||||
*/
|
*/
|
||||||
function select_thirdparty($selected = '', $htmlname = 'socid', $filter = '', $limit = 20, $ajaxoptions = array(), $forcecombo = 0)
|
public function select_thirdparty($selected = '', $htmlname = 'socid', $filter = '', $limit = 20, $ajaxoptions = array(), $forcecombo = 0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
return $this->select_thirdparty_list($selected, $htmlname, $filter, 1, 0, $forcecombo, array(), '', 0, $limit);
|
return $this->select_thirdparty_list($selected, $htmlname, $filter, 1, 0, $forcecombo, array(), '', 0, $limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Output html form to select a third party
|
* Output html form to select a third party
|
||||||
*
|
*
|
||||||
@ -1057,7 +1057,7 @@ class Form
|
|||||||
* @param bool $multiple add [] in the name of element and add 'multiple' attribut (not working with ajax_autocompleter)
|
* @param bool $multiple add [] in the name of element and add 'multiple' attribut (not working with ajax_autocompleter)
|
||||||
* @return string HTML string with select box for thirdparty.
|
* @return string HTML string with select box for thirdparty.
|
||||||
*/
|
*/
|
||||||
function select_company($selected = '', $htmlname = 'socid', $filter = '', $showempty = '', $showtype = 0, $forcecombo = 0, $events = array(), $limit = 0, $morecss = 'minwidth100', $moreparam = '', $selected_input_value = '', $hidelabel = 1, $ajaxoptions = array(), $multiple = false)
|
public function select_company($selected = '', $htmlname = 'socid', $filter = '', $showempty = '', $showtype = 0, $forcecombo = 0, $events = array(), $limit = 0, $morecss = 'minwidth100', $moreparam = '', $selected_input_value = '', $hidelabel = 1, $ajaxoptions = array(), $multiple = false)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $conf,$user,$langs;
|
global $conf,$user,$langs;
|
||||||
@ -1101,7 +1101,7 @@ class Form
|
|||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Output html form to select a third party.
|
* Output html form to select a third party.
|
||||||
* Note, you must use the select_company to get the component to select a third party. This function must only be called by select_company.
|
* Note, you must use the select_company to get the component to select a third party. This function must only be called by select_company.
|
||||||
@ -1121,7 +1121,7 @@ class Form
|
|||||||
* @param bool $multiple add [] in the name of element and add 'multiple' attribut
|
* @param bool $multiple add [] in the name of element and add 'multiple' attribut
|
||||||
* @return string HTML string with
|
* @return string HTML string with
|
||||||
*/
|
*/
|
||||||
function select_thirdparty_list($selected = '', $htmlname = 'socid', $filter = '', $showempty = '', $showtype = 0, $forcecombo = 0, $events = array(), $filterkey = '', $outputmode = 0, $limit = 0, $morecss = 'minwidth100', $moreparam = '', $multiple = false)
|
public function select_thirdparty_list($selected = '', $htmlname = 'socid', $filter = '', $showempty = '', $showtype = 0, $forcecombo = 0, $events = array(), $filterkey = '', $outputmode = 0, $limit = 0, $morecss = 'minwidth100', $moreparam = '', $multiple = false)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $conf,$user,$langs;
|
global $conf,$user,$langs;
|
||||||
@ -1284,7 +1284,7 @@ class Form
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return HTML combo list of absolute discounts
|
* Return HTML combo list of absolute discounts
|
||||||
*
|
*
|
||||||
@ -1295,7 +1295,7 @@ class Form
|
|||||||
* @param int $maxvalue Max value for lines that can be selected
|
* @param int $maxvalue Max value for lines that can be selected
|
||||||
* @return int Return number of qualifed lines in list
|
* @return int Return number of qualifed lines in list
|
||||||
*/
|
*/
|
||||||
function select_remises($selected, $htmlname, $filter, $socid, $maxvalue = 0)
|
public function select_remises($selected, $htmlname, $filter, $socid, $maxvalue = 0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs,$conf;
|
global $langs,$conf;
|
||||||
@ -1361,7 +1361,7 @@ class Form
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return list of all contacts (for a third party or all)
|
* Return list of all contacts (for a third party or all)
|
||||||
*
|
*
|
||||||
@ -1382,7 +1382,7 @@ class Form
|
|||||||
* @return int <0 if KO, Nb of contact in list if OK
|
* @return int <0 if KO, Nb of contact in list if OK
|
||||||
* @deprected You can use selectcontacts directly (warning order of param was changed)
|
* @deprected You can use selectcontacts directly (warning order of param was changed)
|
||||||
*/
|
*/
|
||||||
function select_contacts($socid, $selected = '', $htmlname = 'contactid', $showempty = 0, $exclude = '', $limitto = '', $showfunction = 0, $moreclass = '', $showsoc = 0, $forcecombo = 0, $events = array(), $options_only = false, $moreparam = '', $htmlid = '')
|
public function select_contacts($socid, $selected = '', $htmlname = 'contactid', $showempty = 0, $exclude = '', $limitto = '', $showfunction = 0, $moreclass = '', $showsoc = 0, $forcecombo = 0, $events = array(), $options_only = false, $moreparam = '', $htmlid = '')
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
print $this->selectcontacts($socid, $selected, $htmlname, $showempty, $exclude, $limitto, $showfunction, $moreclass, $options_only, $showsoc, $forcecombo, $events, $moreparam, $htmlid);
|
print $this->selectcontacts($socid, $selected, $htmlname, $showempty, $exclude, $limitto, $showfunction, $moreclass, $options_only, $showsoc, $forcecombo, $events, $moreparam, $htmlid);
|
||||||
@ -1412,7 +1412,7 @@ class Form
|
|||||||
* @param bool $multiple add [] in the name of element and add 'multiple' attribut
|
* @param bool $multiple add [] in the name of element and add 'multiple' attribut
|
||||||
* @return int <0 if KO, Nb of contact in list if OK
|
* @return int <0 if KO, Nb of contact in list if OK
|
||||||
*/
|
*/
|
||||||
function selectcontacts($socid, $selected = '', $htmlname = 'contactid', $showempty = 0, $exclude = '', $limitto = '', $showfunction = 0, $moreclass = '', $options_only = false, $showsoc = 0, $forcecombo = 0, $events = array(), $moreparam = '', $htmlid = '', $multiple = false)
|
public function selectcontacts($socid, $selected = '', $htmlname = 'contactid', $showempty = 0, $exclude = '', $limitto = '', $showfunction = 0, $moreclass = '', $options_only = false, $showsoc = 0, $forcecombo = 0, $events = array(), $moreparam = '', $htmlid = '', $multiple = false)
|
||||||
{
|
{
|
||||||
global $conf,$langs,$hookmanager,$action;
|
global $conf,$langs,$hookmanager,$action;
|
||||||
|
|
||||||
@ -1543,7 +1543,7 @@ class Form
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return select list of users
|
* Return select list of users
|
||||||
*
|
*
|
||||||
@ -1559,13 +1559,13 @@ class Form
|
|||||||
* @deprecated Use select_dolusers instead
|
* @deprecated Use select_dolusers instead
|
||||||
* @see select_dolusers()
|
* @see select_dolusers()
|
||||||
*/
|
*/
|
||||||
function select_users($selected = '', $htmlname = 'userid', $show_empty = 0, $exclude = null, $disabled = 0, $include = '', $enableonly = '', $force_entity = '0')
|
public function select_users($selected = '', $htmlname = 'userid', $show_empty = 0, $exclude = null, $disabled = 0, $include = '', $enableonly = '', $force_entity = '0')
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
print $this->select_dolusers($selected, $htmlname, $show_empty, $exclude, $disabled, $include, $enableonly, $force_entity);
|
print $this->select_dolusers($selected, $htmlname, $show_empty, $exclude, $disabled, $include, $enableonly, $force_entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return select list of users
|
* Return select list of users
|
||||||
*
|
*
|
||||||
@ -1589,7 +1589,7 @@ class Form
|
|||||||
* @return string HTML select string
|
* @return string HTML select string
|
||||||
* @see select_dolgroups
|
* @see select_dolgroups
|
||||||
*/
|
*/
|
||||||
function select_dolusers($selected = '', $htmlname = 'userid', $show_empty = 0, $exclude = null, $disabled = 0, $include = '', $enableonly = '', $force_entity = '0', $maxlength = 0, $showstatus = 0, $morefilter = '', $show_every = 0, $enableonlytext = '', $morecss = '', $noactive = 0, $outputmode = 0, $multiple = false)
|
public function select_dolusers($selected = '', $htmlname = 'userid', $show_empty = 0, $exclude = null, $disabled = 0, $include = '', $enableonly = '', $force_entity = '0', $maxlength = 0, $showstatus = 0, $morefilter = '', $show_every = 0, $enableonlytext = '', $morecss = '', $noactive = 0, $outputmode = 0, $multiple = false)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $conf,$user,$langs;
|
global $conf,$user,$langs;
|
||||||
@ -1774,7 +1774,7 @@ class Form
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return select list of users. Selected users are stored into session.
|
* Return select list of users. Selected users are stored into session.
|
||||||
* List of users are provided into $_SESSION['assignedtouser'].
|
* List of users are provided into $_SESSION['assignedtouser'].
|
||||||
@ -1797,7 +1797,7 @@ class Form
|
|||||||
* @return string HTML select string
|
* @return string HTML select string
|
||||||
* @see select_dolgroups
|
* @see select_dolgroups
|
||||||
*/
|
*/
|
||||||
function select_dolusers_forevent($action = '', $htmlname = 'userid', $show_empty = 0, $exclude = null, $disabled = 0, $include = '', $enableonly = '', $force_entity = '0', $maxlength = 0, $showstatus = 0, $morefilter = '', $showproperties = 0, $listofuserid = array(), $listofcontactid = array(), $listofotherid = array())
|
public function select_dolusers_forevent($action = '', $htmlname = 'userid', $show_empty = 0, $exclude = null, $disabled = 0, $include = '', $enableonly = '', $force_entity = '0', $maxlength = 0, $showstatus = 0, $morefilter = '', $showproperties = 0, $listofuserid = array(), $listofcontactid = array(), $listofotherid = array())
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $conf, $user, $langs;
|
global $conf, $user, $langs;
|
||||||
@ -1864,7 +1864,7 @@ class Form
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return list of products for customer in Ajax if Ajax activated or go to select_produits_list
|
* Return list of products for customer in Ajax if Ajax activated or go to select_produits_list
|
||||||
*
|
*
|
||||||
@ -1890,7 +1890,7 @@ class Form
|
|||||||
* @param array $selected_combinations Selected combinations. Format: array([attrid] => attrval, [...])
|
* @param array $selected_combinations Selected combinations. Format: array([attrid] => attrval, [...])
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function select_produits($selected = '', $htmlname = 'productid', $filtertype = '', $limit = 20, $price_level = 0, $status = 1, $finished = 2, $selected_input_value = '', $hidelabel = 0, $ajaxoptions = array(), $socid = 0, $showempty = '1', $forcecombo = 0, $morecss = '', $hidepriceinlabel = 0, $warehouseStatus = '', $selected_combinations = array())
|
public function select_produits($selected = '', $htmlname = 'productid', $filtertype = '', $limit = 20, $price_level = 0, $status = 1, $finished = 2, $selected_input_value = '', $hidelabel = 0, $ajaxoptions = array(), $socid = 0, $showempty = '1', $forcecombo = 0, $morecss = '', $hidepriceinlabel = 0, $warehouseStatus = '', $selected_combinations = array())
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs,$conf;
|
global $langs,$conf;
|
||||||
@ -2008,7 +2008,7 @@ class Form
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return list of products for a customer
|
* Return list of products for a customer
|
||||||
*
|
*
|
||||||
@ -2032,7 +2032,7 @@ class Form
|
|||||||
* 'warehouseinternal' = select products from warehouses for internal correct/transfer only
|
* 'warehouseinternal' = select products from warehouses for internal correct/transfer only
|
||||||
* @return array Array of keys for json
|
* @return array Array of keys for json
|
||||||
*/
|
*/
|
||||||
function select_produits_list($selected = '', $htmlname = 'productid', $filtertype = '', $limit = 20, $price_level = 0, $filterkey = '', $status = 1, $finished = 2, $outputmode = 0, $socid = 0, $showempty = '1', $forcecombo = 0, $morecss = '', $hidepriceinlabel = 0, $warehouseStatus = '')
|
public function select_produits_list($selected = '', $htmlname = 'productid', $filtertype = '', $limit = 20, $price_level = 0, $filterkey = '', $status = 1, $finished = 2, $outputmode = 0, $socid = 0, $showempty = '1', $forcecombo = 0, $morecss = '', $hidepriceinlabel = 0, $warehouseStatus = '')
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs,$conf,$user,$db;
|
global $langs,$conf,$user,$db;
|
||||||
@ -2561,7 +2561,7 @@ class Form
|
|||||||
$optJson = array('key'=>$outkey, 'value'=>$outref, 'label'=>$outval, 'label2'=>$outlabel, 'desc'=>$outdesc, 'type'=>$outtype, 'price_ht'=>$outprice_ht, 'price_ttc'=>$outprice_ttc, 'pricebasetype'=>$outpricebasetype, 'tva_tx'=>$outtva_tx, 'qty'=>$outqty, 'discount'=>$outdiscount, 'duration_value'=>$outdurationvalue, 'duration_unit'=>$outdurationunit);
|
$optJson = array('key'=>$outkey, 'value'=>$outref, 'label'=>$outval, 'label2'=>$outlabel, 'desc'=>$outdesc, 'type'=>$outtype, 'price_ht'=>$outprice_ht, 'price_ttc'=>$outprice_ttc, 'pricebasetype'=>$outpricebasetype, 'tva_tx'=>$outtva_tx, 'qty'=>$outqty, 'discount'=>$outdiscount, 'duration_value'=>$outdurationvalue, 'duration_unit'=>$outdurationunit);
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return list of products for customer (in Ajax if Ajax activated or go to select_produits_fournisseurs_list)
|
* Return list of products for customer (in Ajax if Ajax activated or go to select_produits_fournisseurs_list)
|
||||||
*
|
*
|
||||||
@ -2576,7 +2576,7 @@ class Form
|
|||||||
* @param string $morecss More CSS
|
* @param string $morecss More CSS
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function select_produits_fournisseurs($socid, $selected = '', $htmlname = 'productid', $filtertype = '', $filtre = '', $ajaxoptions = array(), $hidelabel = 0, $alsoproductwithnosupplierprice = 0, $morecss = '')
|
public function select_produits_fournisseurs($socid, $selected = '', $htmlname = 'productid', $filtertype = '', $filtre = '', $ajaxoptions = array(), $hidelabel = 0, $alsoproductwithnosupplierprice = 0, $morecss = '')
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs,$conf;
|
global $langs,$conf;
|
||||||
@ -2605,7 +2605,7 @@ class Form
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return list of suppliers products
|
* Return list of suppliers products
|
||||||
*
|
*
|
||||||
@ -2622,7 +2622,7 @@ class Form
|
|||||||
* @param string $morecss Add more CSS
|
* @param string $morecss Add more CSS
|
||||||
* @return array Array of keys for json
|
* @return array Array of keys for json
|
||||||
*/
|
*/
|
||||||
function select_produits_fournisseurs_list($socid, $selected = '', $htmlname = 'productid', $filtertype = '', $filtre = '', $filterkey = '', $statut = -1, $outputmode = 0, $limit = 100, $alsoproductwithnosupplierprice = 0, $morecss = '')
|
public function select_produits_fournisseurs_list($socid, $selected = '', $htmlname = 'productid', $filtertype = '', $filtre = '', $filterkey = '', $statut = -1, $outputmode = 0, $limit = 100, $alsoproductwithnosupplierprice = 0, $morecss = '')
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs,$conf,$db;
|
global $langs,$conf,$db;
|
||||||
@ -2837,7 +2837,7 @@ class Form
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return list of suppliers prices for a product
|
* Return list of suppliers prices for a product
|
||||||
*
|
*
|
||||||
@ -2846,7 +2846,7 @@ class Form
|
|||||||
* @param int $selected_supplier Pre-selected supplier if more than 1 result
|
* @param int $selected_supplier Pre-selected supplier if more than 1 result
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function select_product_fourn_price($productid, $htmlname = 'productfournpriceid', $selected_supplier = '')
|
public function select_product_fourn_price($productid, $htmlname = 'productfournpriceid', $selected_supplier = '')
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs,$conf;
|
global $langs,$conf;
|
||||||
@ -2950,7 +2950,7 @@ class Form
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return list of delivery address
|
* Return list of delivery address
|
||||||
*
|
*
|
||||||
@ -2960,7 +2960,7 @@ class Form
|
|||||||
* @param int $showempty Add an empty field
|
* @param int $showempty Add an empty field
|
||||||
* @return integer|null
|
* @return integer|null
|
||||||
*/
|
*/
|
||||||
function select_address($selected, $socid, $htmlname = 'address_id', $showempty = 0)
|
public function select_address($selected, $socid, $htmlname = 'address_id', $showempty = 0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
// looking for users
|
// looking for users
|
||||||
@ -3004,13 +3004,13 @@ class Form
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Load into cache list of payment terms
|
* Load into cache list of payment terms
|
||||||
*
|
*
|
||||||
* @return int Nb of lines loaded, <0 if KO
|
* @return int Nb of lines loaded, <0 if KO
|
||||||
*/
|
*/
|
||||||
function load_cache_conditions_paiements()
|
public function load_cache_conditions_paiements()
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs;
|
global $langs;
|
||||||
@ -3053,13 +3053,13 @@ class Form
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Charge dans cache la liste des délais de livraison possibles
|
* Charge dans cache la liste des délais de livraison possibles
|
||||||
*
|
*
|
||||||
* @return int Nb of lines loaded, <0 if KO
|
* @return int Nb of lines loaded, <0 if KO
|
||||||
*/
|
*/
|
||||||
function load_cache_availability()
|
public function load_cache_availability()
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs;
|
global $langs;
|
||||||
@ -3111,7 +3111,7 @@ class Form
|
|||||||
* @param int $addempty Add empty entry
|
* @param int $addempty Add empty entry
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function selectAvailabilityDelay($selected = '', $htmlname = 'availid', $filtertype = '', $addempty = 0)
|
public function selectAvailabilityDelay($selected = '', $htmlname = 'availid', $filtertype = '', $addempty = 0)
|
||||||
{
|
{
|
||||||
global $langs,$user;
|
global $langs,$user;
|
||||||
|
|
||||||
@ -3143,7 +3143,7 @@ class Form
|
|||||||
*
|
*
|
||||||
* @return int Nb of lines loaded, <0 if KO
|
* @return int Nb of lines loaded, <0 if KO
|
||||||
*/
|
*/
|
||||||
function loadCacheInputReason()
|
public function loadCacheInputReason()
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
@ -3197,7 +3197,7 @@ class Form
|
|||||||
* @param int $addempty Add an empty entry
|
* @param int $addempty Add an empty entry
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function selectInputReason($selected = '', $htmlname = 'demandreasonid', $exclude = '', $addempty = 0)
|
public function selectInputReason($selected = '', $htmlname = 'demandreasonid', $exclude = '', $addempty = 0)
|
||||||
{
|
{
|
||||||
global $langs,$user;
|
global $langs,$user;
|
||||||
|
|
||||||
@ -3225,13 +3225,13 @@ class Form
|
|||||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Charge dans cache la liste des types de paiements possibles
|
* Charge dans cache la liste des types de paiements possibles
|
||||||
*
|
*
|
||||||
* @return int Nb of lines loaded, <0 if KO
|
* @return int Nb of lines loaded, <0 if KO
|
||||||
*/
|
*/
|
||||||
function load_cache_types_paiements()
|
public function load_cache_types_paiements()
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs;
|
global $langs;
|
||||||
@ -3279,7 +3279,7 @@ class Form
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return list of payment modes.
|
* Return list of payment modes.
|
||||||
* Constant MAIN_DEFAULT_PAYMENT_TERM_ID can used to set default value but scope is all application, probably not what you want.
|
* Constant MAIN_DEFAULT_PAYMENT_TERM_ID can used to set default value but scope is all application, probably not what you want.
|
||||||
@ -3293,7 +3293,7 @@ class Form
|
|||||||
* @param string $morecss Add more CSS on select tag
|
* @param string $morecss Add more CSS on select tag
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function select_conditions_paiements($selected = 0, $htmlname = 'condid', $filtertype = -1, $addempty = 0, $noinfoadmin = 0, $morecss = '')
|
public function select_conditions_paiements($selected = 0, $htmlname = 'condid', $filtertype = -1, $addempty = 0, $noinfoadmin = 0, $morecss = '')
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs, $user, $conf;
|
global $langs, $user, $conf;
|
||||||
@ -3325,7 +3325,7 @@ class Form
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return list of payment methods
|
* Return list of payment methods
|
||||||
*
|
*
|
||||||
@ -3340,7 +3340,7 @@ class Form
|
|||||||
* @param string $morecss Add more CSS on select tag
|
* @param string $morecss Add more CSS on select tag
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function select_types_paiements($selected = '', $htmlname = 'paiementtype', $filtertype = '', $format = 0, $empty = 1, $noadmininfo = 0, $maxlength = 0, $active = 1, $morecss = '')
|
public function select_types_paiements($selected = '', $htmlname = 'paiementtype', $filtertype = '', $format = 0, $empty = 1, $noadmininfo = 0, $maxlength = 0, $active = 1, $morecss = '')
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs,$user;
|
global $langs,$user;
|
||||||
@ -3394,7 +3394,7 @@ class Form
|
|||||||
* @param string $htmlname Nom de la zone select
|
* @param string $htmlname Nom de la zone select
|
||||||
* @return string Code of HTML select to chose tax or not
|
* @return string Code of HTML select to chose tax or not
|
||||||
*/
|
*/
|
||||||
function selectPriceBaseType($selected = '', $htmlname = 'price_base_type')
|
public function selectPriceBaseType($selected = '', $htmlname = 'price_base_type')
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
@ -3432,7 +3432,7 @@ class Form
|
|||||||
* @param string $moreattrib To add more attribute on select
|
* @param string $moreattrib To add more attribute on select
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function selectShippingMethod($selected = '', $htmlname = 'shipping_method_id', $filtre = '', $useempty = 0, $moreattrib = '')
|
public function selectShippingMethod($selected = '', $htmlname = 'shipping_method_id', $filtre = '', $useempty = 0, $moreattrib = '')
|
||||||
{
|
{
|
||||||
global $langs, $conf, $user;
|
global $langs, $conf, $user;
|
||||||
|
|
||||||
@ -3485,7 +3485,7 @@ class Form
|
|||||||
* @param int $addempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries.
|
* @param int $addempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries.
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function formSelectShippingMethod($page, $selected = '', $htmlname = 'shipping_method_id', $addempty = 0)
|
public function formSelectShippingMethod($page, $selected = '', $htmlname = 'shipping_method_id', $addempty = 0)
|
||||||
{
|
{
|
||||||
global $langs, $db;
|
global $langs, $db;
|
||||||
|
|
||||||
@ -3516,7 +3516,7 @@ class Form
|
|||||||
*
|
*
|
||||||
* @return string HTML select
|
* @return string HTML select
|
||||||
*/
|
*/
|
||||||
function selectSituationInvoices($selected = '', $socid = 0)
|
public function selectSituationInvoices($selected = '', $socid = 0)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
@ -3570,7 +3570,7 @@ class Form
|
|||||||
* @param int $showempty Add a nempty line
|
* @param int $showempty Add a nempty line
|
||||||
* @return string HTML select
|
* @return string HTML select
|
||||||
*/
|
*/
|
||||||
function selectUnits($selected = '', $htmlname = 'units', $showempty = 0)
|
public function selectUnits($selected = '', $htmlname = 'units', $showempty = 0)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
@ -3608,7 +3608,7 @@ class Form
|
|||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return a HTML select list of bank accounts
|
* Return a HTML select list of bank accounts
|
||||||
*
|
*
|
||||||
@ -3621,7 +3621,7 @@ class Form
|
|||||||
* @param int $showcurrency Show currency in label
|
* @param int $showcurrency Show currency in label
|
||||||
* @return int <0 if error, Num of bank account found if OK (0, 1, 2, ...)
|
* @return int <0 if error, Num of bank account found if OK (0, 1, 2, ...)
|
||||||
*/
|
*/
|
||||||
function select_comptes($selected = '', $htmlname = 'accountid', $statut = 0, $filtre = '', $useempty = 0, $moreattrib = '', $showcurrency = 0)
|
public function select_comptes($selected = '', $htmlname = 'accountid', $statut = 0, $filtre = '', $useempty = 0, $moreattrib = '', $showcurrency = 0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs, $conf;
|
global $langs, $conf;
|
||||||
@ -3691,7 +3691,7 @@ class Form
|
|||||||
* @param int $addempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries.
|
* @param int $addempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries.
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function formSelectAccount($page, $selected = '', $htmlname = 'fk_account', $addempty = 0)
|
public function formSelectAccount($page, $selected = '', $htmlname = 'fk_account', $addempty = 0)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
if ($htmlname != "none") {
|
if ($htmlname != "none") {
|
||||||
@ -3716,7 +3716,7 @@ class Form
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return list of categories having choosed type
|
* Return list of categories having choosed type
|
||||||
*
|
*
|
||||||
@ -3729,7 +3729,7 @@ class Form
|
|||||||
* @return string
|
* @return string
|
||||||
* @see select_categories
|
* @see select_categories
|
||||||
*/
|
*/
|
||||||
function select_all_categories($type, $selected = '', $htmlname = "parent", $maxlength = 64, $excludeafterid = 0, $outputmode = 0)
|
public function select_all_categories($type, $selected = '', $htmlname = "parent", $maxlength = 64, $excludeafterid = 0, $outputmode = 0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
@ -3803,7 +3803,7 @@ class Form
|
|||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Show a confirmation HTML form or AJAX popup
|
* Show a confirmation HTML form or AJAX popup
|
||||||
*
|
*
|
||||||
@ -3820,7 +3820,7 @@ class Form
|
|||||||
* @deprecated
|
* @deprecated
|
||||||
* @see formconfirm()
|
* @see formconfirm()
|
||||||
*/
|
*/
|
||||||
function form_confirm($page, $title, $question, $action, $formquestion = '', $selectedchoice = "", $useajax = 0, $height = 170, $width = 500)
|
public function form_confirm($page, $title, $question, $action, $formquestion = '', $selectedchoice = "", $useajax = 0, $height = 170, $width = 500)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
dol_syslog(__METHOD__ . ': using form_confirm is deprecated. Use formconfim instead.', LOG_WARNING);
|
dol_syslog(__METHOD__ . ': using form_confirm is deprecated. Use formconfim instead.', LOG_WARNING);
|
||||||
@ -3851,7 +3851,7 @@ class Form
|
|||||||
* @param int $disableformtag 1=Disable form tag. Can be used if we are already inside a <form> section.
|
* @param int $disableformtag 1=Disable form tag. Can be used if we are already inside a <form> section.
|
||||||
* @return string HTML ajax code if a confirm ajax popup is required, Pure HTML code if it's an html form
|
* @return string HTML ajax code if a confirm ajax popup is required, Pure HTML code if it's an html form
|
||||||
*/
|
*/
|
||||||
function formconfirm($page, $title, $question, $action, $formquestion = '', $selectedchoice = '', $useajax = 0, $height = 210, $width = 500, $disableformtag = 0)
|
public function formconfirm($page, $title, $question, $action, $formquestion = '', $selectedchoice = '', $useajax = 0, $height = 210, $width = 500, $disableformtag = 0)
|
||||||
{
|
{
|
||||||
global $langs,$conf;
|
global $langs,$conf;
|
||||||
global $useglobalvars;
|
global $useglobalvars;
|
||||||
@ -4117,7 +4117,7 @@ class Form
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Show a form to select a project
|
* Show a form to select a project
|
||||||
*
|
*
|
||||||
@ -4131,7 +4131,7 @@ class Form
|
|||||||
* @param int $nooutput No print is done. String is returned.
|
* @param int $nooutput No print is done. String is returned.
|
||||||
* @return string Return html content
|
* @return string Return html content
|
||||||
*/
|
*/
|
||||||
function form_project($page, $socid, $selected = '', $htmlname = 'projectid', $discard_closed = 0, $maxlength = 20, $forcefocus = 0, $nooutput = 0)
|
public function form_project($page, $socid, $selected = '', $htmlname = 'projectid', $discard_closed = 0, $maxlength = 20, $forcefocus = 0, $nooutput = 0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs;
|
global $langs;
|
||||||
@ -4177,7 +4177,7 @@ class Form
|
|||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Show a form to select payment conditions
|
* Show a form to select payment conditions
|
||||||
*
|
*
|
||||||
@ -4187,7 +4187,7 @@ class Form
|
|||||||
* @param int $addempty Add empty entry
|
* @param int $addempty Add empty entry
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function form_conditions_reglement($page, $selected = '', $htmlname = 'cond_reglement_id', $addempty = 0)
|
public function form_conditions_reglement($page, $selected = '', $htmlname = 'cond_reglement_id', $addempty = 0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs;
|
global $langs;
|
||||||
@ -4212,7 +4212,7 @@ class Form
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Show a form to select a delivery delay
|
* Show a form to select a delivery delay
|
||||||
*
|
*
|
||||||
@ -4222,7 +4222,7 @@ class Form
|
|||||||
* @param int $addempty Ajoute entree vide
|
* @param int $addempty Ajoute entree vide
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function form_availability($page, $selected = '', $htmlname = 'availability', $addempty = 0)
|
public function form_availability($page, $selected = '', $htmlname = 'availability', $addempty = 0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs;
|
global $langs;
|
||||||
@ -4257,7 +4257,7 @@ class Form
|
|||||||
* @param int $addempty Add empty entry
|
* @param int $addempty Add empty entry
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function formInputReason($page, $selected = '', $htmlname = 'demandreason', $addempty = 0)
|
public function formInputReason($page, $selected = '', $htmlname = 'demandreason', $addempty = 0)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
if ($htmlname != "none")
|
if ($htmlname != "none")
|
||||||
@ -4288,7 +4288,7 @@ class Form
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Show a form + html select a date
|
* Show a form + html select a date
|
||||||
*
|
*
|
||||||
@ -4301,7 +4301,7 @@ class Form
|
|||||||
* @return string
|
* @return string
|
||||||
* @see selectDate
|
* @see selectDate
|
||||||
*/
|
*/
|
||||||
function form_date($page, $selected, $htmlname, $displayhour = 0, $displaymin = 0, $nooutput = 0)
|
public function form_date($page, $selected, $htmlname, $displayhour = 0, $displaymin = 0, $nooutput = 0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs;
|
global $langs;
|
||||||
@ -4331,7 +4331,7 @@ class Form
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Show a select form to choose a user
|
* Show a select form to choose a user
|
||||||
*
|
*
|
||||||
@ -4342,7 +4342,7 @@ class Form
|
|||||||
* @param array $include List of users id to include
|
* @param array $include List of users id to include
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function form_users($page, $selected = '', $htmlname = 'userid', $exclude = '', $include = '')
|
public function form_users($page, $selected = '', $htmlname = 'userid', $exclude = '', $include = '')
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs;
|
global $langs;
|
||||||
@ -4371,7 +4371,7 @@ class Form
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Show form with payment mode
|
* Show form with payment mode
|
||||||
*
|
*
|
||||||
@ -4383,7 +4383,7 @@ class Form
|
|||||||
* @param int $addempty 1=Add empty entry
|
* @param int $addempty 1=Add empty entry
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function form_modes_reglement($page, $selected = '', $htmlname = 'mode_reglement_id', $filtertype = '', $active = 1, $addempty = 0)
|
public function form_modes_reglement($page, $selected = '', $htmlname = 'mode_reglement_id', $filtertype = '', $active = 1, $addempty = 0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs;
|
global $langs;
|
||||||
@ -4408,7 +4408,7 @@ class Form
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Show form with multicurrency code
|
* Show form with multicurrency code
|
||||||
*
|
*
|
||||||
@ -4417,7 +4417,7 @@ class Form
|
|||||||
* @param string $htmlname Name of select html field
|
* @param string $htmlname Name of select html field
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function form_multicurrency_code($page, $selected = '', $htmlname = 'multicurrency_code')
|
public function form_multicurrency_code($page, $selected = '', $htmlname = 'multicurrency_code')
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs;
|
global $langs;
|
||||||
@ -4437,7 +4437,7 @@ class Form
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Show form with multicurrency rate
|
* Show form with multicurrency rate
|
||||||
*
|
*
|
||||||
@ -4447,7 +4447,7 @@ class Form
|
|||||||
* @param string $currency Currency code to explain the rate
|
* @param string $currency Currency code to explain the rate
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function form_multicurrency_rate($page, $rate = '', $htmlname = 'multicurrency_tx', $currency = '')
|
public function form_multicurrency_rate($page, $rate = '', $htmlname = 'multicurrency_tx', $currency = '')
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs, $mysoc, $conf;
|
global $langs, $mysoc, $conf;
|
||||||
@ -4480,7 +4480,7 @@ class Form
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Show a select box with available absolute discounts
|
* Show a select box with available absolute discounts
|
||||||
*
|
*
|
||||||
@ -4496,7 +4496,7 @@ class Form
|
|||||||
* @param int $discount_type 0 => customer discount, 1 => supplier discount
|
* @param int $discount_type 0 => customer discount, 1 => supplier discount
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function form_remise_dispo($page, $selected, $htmlname, $socid, $amount, $filter = '', $maxvalue = 0, $more = '', $hidelist = 0, $discount_type = 0)
|
public function form_remise_dispo($page, $selected, $htmlname, $socid, $amount, $filter = '', $maxvalue = 0, $more = '', $hidelist = 0, $discount_type = 0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
@ -4577,7 +4577,7 @@ class Form
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Show forms to select a contact
|
* Show forms to select a contact
|
||||||
*
|
*
|
||||||
@ -4587,7 +4587,7 @@ class Form
|
|||||||
* @param string $htmlname Name of HTML select. If 'none', we just show contact link.
|
* @param string $htmlname Name of HTML select. If 'none', we just show contact link.
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function form_contacts($page, $societe, $selected = '', $htmlname = 'contactid')
|
public function form_contacts($page, $societe, $selected = '', $htmlname = 'contactid')
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs, $conf;
|
global $langs, $conf;
|
||||||
@ -4623,7 +4623,7 @@ class Form
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Output html select to select thirdparty
|
* Output html select to select thirdparty
|
||||||
*
|
*
|
||||||
@ -4638,7 +4638,7 @@ class Form
|
|||||||
* @param int $nooutput No print output. Return it only.
|
* @param int $nooutput No print output. Return it only.
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function form_thirdparty($page, $selected = '', $htmlname = 'socid', $filter = '', $showempty = 0, $showtype = 0, $forcecombo = 0, $events = array(), $nooutput = 0)
|
public function form_thirdparty($page, $selected = '', $htmlname = 'socid', $filter = '', $showempty = 0, $showtype = 0, $forcecombo = 0, $events = array(), $nooutput = 0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs;
|
global $langs;
|
||||||
@ -4672,7 +4672,7 @@ class Form
|
|||||||
else print $out;
|
else print $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Retourne la liste des devises, dans la langue de l'utilisateur
|
* Retourne la liste des devises, dans la langue de l'utilisateur
|
||||||
*
|
*
|
||||||
@ -4681,7 +4681,7 @@ class Form
|
|||||||
* @deprecated
|
* @deprecated
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function select_currency($selected = '', $htmlname = 'currency_id')
|
public function select_currency($selected = '', $htmlname = 'currency_id')
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
print $this->selectCurrency($selected, $htmlname);
|
print $this->selectCurrency($selected, $htmlname);
|
||||||
@ -4694,7 +4694,7 @@ class Form
|
|||||||
* @param string $htmlname name of HTML select list
|
* @param string $htmlname name of HTML select list
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function selectCurrency($selected = '', $htmlname = 'currency_id')
|
public function selectCurrency($selected = '', $htmlname = 'currency_id')
|
||||||
{
|
{
|
||||||
global $conf,$langs,$user;
|
global $conf,$langs,$user;
|
||||||
|
|
||||||
@ -4737,7 +4737,7 @@ class Form
|
|||||||
* @param integer $useempty 1=Add empty line
|
* @param integer $useempty 1=Add empty line
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function selectMultiCurrency($selected = '', $htmlname = 'multicurrency_code', $useempty = 0)
|
public function selectMultiCurrency($selected = '', $htmlname = 'multicurrency_code', $useempty = 0)
|
||||||
{
|
{
|
||||||
global $db,$conf,$langs,$user;
|
global $db,$conf,$langs,$user;
|
||||||
|
|
||||||
@ -4785,14 +4785,14 @@ class Form
|
|||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Load into the cache vat rates of a country
|
* Load into the cache vat rates of a country
|
||||||
*
|
*
|
||||||
* @param string $country_code Country code with quotes ("'CA'", or "'CA,IN,...'")
|
* @param string $country_code Country code with quotes ("'CA'", or "'CA,IN,...'")
|
||||||
* @return int Nb of loaded lines, 0 if already loaded, <0 if KO
|
* @return int Nb of loaded lines, 0 if already loaded, <0 if KO
|
||||||
*/
|
*/
|
||||||
function load_cache_vatrates($country_code)
|
public function load_cache_vatrates($country_code)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs;
|
global $langs;
|
||||||
@ -4852,7 +4852,7 @@ class Form
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Output an HTML select vat rate.
|
* Output an HTML select vat rate.
|
||||||
* The name of this function should be selectVat. We keep bad name for compatibility purpose.
|
* The name of this function should be selectVat. We keep bad name for compatibility purpose.
|
||||||
@ -4874,7 +4874,7 @@ class Form
|
|||||||
* @param int $mode 0=Use vat rate as key in combo list, 1=Add VAT code after vat rate into key, -1=Use id of vat line as key
|
* @param int $mode 0=Use vat rate as key in combo list, 1=Add VAT code after vat rate into key, -1=Use id of vat line as key
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function load_tva($htmlname = 'tauxtva', $selectedrate = '', $societe_vendeuse = '', $societe_acheteuse = '', $idprod = 0, $info_bits = 0, $type = '', $options_only = false, $mode = 0)
|
public function load_tva($htmlname = 'tauxtva', $selectedrate = '', $societe_vendeuse = '', $societe_acheteuse = '', $idprod = 0, $info_bits = 0, $type = '', $options_only = false, $mode = 0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs,$conf,$mysoc;
|
global $langs,$conf,$mysoc;
|
||||||
@ -5049,7 +5049,7 @@ class Form
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Show a HTML widget to input a date or combo list for day, month, years and optionaly hours and minutes.
|
* Show a HTML widget to input a date or combo list for day, month, years and optionaly hours and minutes.
|
||||||
* Fields are preselected with :
|
* Fields are preselected with :
|
||||||
@ -5107,7 +5107,7 @@ class Form
|
|||||||
* @return string Html for selectDate
|
* @return string Html for selectDate
|
||||||
* @see form_date, select_month, select_year, select_dayofweek
|
* @see form_date, select_month, select_year, select_dayofweek
|
||||||
*/
|
*/
|
||||||
function selectDate($set_time = '', $prefix = 're', $h = 0, $m = 0, $empty = 0, $form_name = "", $d = 1, $addnowlink = 0, $disabled = 0, $fullday = '', $addplusone = '', $adddateof = '')
|
public function selectDate($set_time = '', $prefix = 're', $h = 0, $m = 0, $empty = 0, $form_name = "", $d = 1, $addnowlink = 0, $disabled = 0, $fullday = '', $addplusone = '', $adddateof = '')
|
||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
@ -5456,7 +5456,7 @@ class Form
|
|||||||
return $retstring;
|
return $retstring;
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Function to show a form to select a duration on a page
|
* Function to show a form to select a duration on a page
|
||||||
*
|
*
|
||||||
@ -5470,7 +5470,7 @@ class Form
|
|||||||
* @param int $nooutput Do not output html string but return it
|
* @param int $nooutput Do not output html string but return it
|
||||||
* @return string|void
|
* @return string|void
|
||||||
*/
|
*/
|
||||||
function select_duration($prefix, $iSecond = '', $disabled = 0, $typehour = 'select', $minunderhours = 0, $nooutput = 0)
|
public function select_duration($prefix, $iSecond = '', $disabled = 0, $typehour = 'select', $minunderhours = 0, $nooutput = 0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs;
|
global $langs;
|
||||||
@ -5558,7 +5558,7 @@ class Form
|
|||||||
* @return string Return HTML string
|
* @return string Return HTML string
|
||||||
* @see selectForFormsList select_thirdparty
|
* @see selectForFormsList select_thirdparty
|
||||||
*/
|
*/
|
||||||
function selectForForms($objectdesc, $htmlname, $preselectedvalue, $showempty = '', $searchkey = '', $placeholder = '', $morecss = '', $moreparams = '', $forcecombo = 0)
|
public function selectForForms($objectdesc, $htmlname, $preselectedvalue, $showempty = '', $searchkey = '', $placeholder = '', $morecss = '', $moreparams = '', $forcecombo = 0)
|
||||||
{
|
{
|
||||||
global $conf, $user;
|
global $conf, $user;
|
||||||
|
|
||||||
@ -5628,7 +5628,7 @@ class Form
|
|||||||
* @return string Return HTML string
|
* @return string Return HTML string
|
||||||
* @see selectForForms
|
* @see selectForForms
|
||||||
*/
|
*/
|
||||||
function selectForFormsList($objecttmp, $htmlname, $preselectedvalue, $showempty = '', $searchkey = '', $placeholder = '', $morecss = '', $moreparams = '', $forcecombo = 0, $outputmode = 0)
|
public function selectForFormsList($objecttmp, $htmlname, $preselectedvalue, $showempty = '', $searchkey = '', $placeholder = '', $morecss = '', $moreparams = '', $forcecombo = 0, $outputmode = 0)
|
||||||
{
|
{
|
||||||
global $conf, $langs, $user;
|
global $conf, $langs, $user;
|
||||||
|
|
||||||
@ -6293,7 +6293,7 @@ class Form
|
|||||||
* @param int $rendermode 0=Default, use multiselect. 1=Emulate multiselect (recommended)
|
* @param int $rendermode 0=Default, use multiselect. 1=Emulate multiselect (recommended)
|
||||||
* @return string String with categories
|
* @return string String with categories
|
||||||
*/
|
*/
|
||||||
function showCategories($id, $type, $rendermode = 0)
|
public function showCategories($id, $type, $rendermode = 0)
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
|
||||||
@ -6338,7 +6338,7 @@ class Form
|
|||||||
* @param array $compatibleImportElementsList Array of compatibles elements object for "import from" action
|
* @param array $compatibleImportElementsList Array of compatibles elements object for "import from" action
|
||||||
* @return int <0 if KO, >=0 if OK
|
* @return int <0 if KO, >=0 if OK
|
||||||
*/
|
*/
|
||||||
function showLinkedObjectBlock($object, $morehtmlright = '', $compatibleImportElementsList = false)
|
public function showLinkedObjectBlock($object, $morehtmlright = '', $compatibleImportElementsList = false)
|
||||||
{
|
{
|
||||||
global $conf,$langs,$hookmanager;
|
global $conf,$langs,$hookmanager;
|
||||||
global $bc;
|
global $bc;
|
||||||
@ -6486,7 +6486,7 @@ class Form
|
|||||||
* @param array $excludelinksto Do not show links of this type, for exemple array('order') or array('supplier_order'). null or array() if no exclusion.
|
* @param array $excludelinksto Do not show links of this type, for exemple array('order') or array('supplier_order'). null or array() if no exclusion.
|
||||||
* @return string <0 if KO, >0 if OK
|
* @return string <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function showLinkToObjectBlock($object, $restrictlinksto = array(), $excludelinksto = array())
|
public function showLinkToObjectBlock($object, $restrictlinksto = array(), $excludelinksto = array())
|
||||||
{
|
{
|
||||||
global $conf, $langs, $hookmanager;
|
global $conf, $langs, $hookmanager;
|
||||||
global $bc;
|
global $bc;
|
||||||
@ -6659,7 +6659,7 @@ class Form
|
|||||||
* @param int $useempty 1=Add empty line
|
* @param int $useempty 1=Add empty line
|
||||||
* @return string See option
|
* @return string See option
|
||||||
*/
|
*/
|
||||||
function selectyesno($htmlname, $value = '', $option = 0, $disabled = false, $useempty = 0)
|
public function selectyesno($htmlname, $value = '', $option = 0, $disabled = false, $useempty = 0)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
@ -6691,7 +6691,7 @@ class Form
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return list of export templates
|
* Return list of export templates
|
||||||
*
|
*
|
||||||
@ -6701,7 +6701,7 @@ class Form
|
|||||||
* @param int $useempty Affiche valeur vide dans liste
|
* @param int $useempty Affiche valeur vide dans liste
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function select_export_model($selected = '', $htmlname = 'exportmodelid', $type = '', $useempty = 0)
|
public function select_export_model($selected = '', $htmlname = 'exportmodelid', $type = '', $useempty = 0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
$sql = "SELECT rowid, label";
|
$sql = "SELECT rowid, label";
|
||||||
@ -6759,7 +6759,7 @@ class Form
|
|||||||
* @param string $morehtmlright More html code to show after ref.
|
* @param string $morehtmlright More html code to show after ref.
|
||||||
* @return string Portion HTML with ref + navigation buttons
|
* @return string Portion HTML with ref + navigation buttons
|
||||||
*/
|
*/
|
||||||
function showrefnav($object, $paramid, $morehtml = '', $shownav = 1, $fieldid = 'rowid', $fieldref = 'ref', $morehtmlref = '', $moreparam = '', $nodbprefix = 0, $morehtmlleft = '', $morehtmlstatus = '', $morehtmlright = '')
|
public function showrefnav($object, $paramid, $morehtml = '', $shownav = 1, $fieldid = 'rowid', $fieldref = 'ref', $morehtmlref = '', $moreparam = '', $nodbprefix = 0, $morehtmlleft = '', $morehtmlstatus = '', $morehtmlright = '')
|
||||||
{
|
{
|
||||||
global $langs,$conf,$hookmanager;
|
global $langs,$conf,$hookmanager;
|
||||||
|
|
||||||
@ -6909,7 +6909,7 @@ class Form
|
|||||||
* @param int $width Width of photo
|
* @param int $width Width of photo
|
||||||
* @return string HTML code to output barcode
|
* @return string HTML code to output barcode
|
||||||
*/
|
*/
|
||||||
function showbarcode(&$object, $width = 100)
|
public function showbarcode(&$object, $width = 100)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -7089,7 +7089,7 @@ class Form
|
|||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return select list of groups
|
* Return select list of groups
|
||||||
*
|
*
|
||||||
@ -7105,7 +7105,7 @@ class Form
|
|||||||
* @return string
|
* @return string
|
||||||
* @see select_dolusers
|
* @see select_dolusers
|
||||||
*/
|
*/
|
||||||
function select_dolgroups($selected = '', $htmlname = 'groupid', $show_empty = 0, $exclude = '', $disabled = 0, $include = '', $enableonly = '', $force_entity = '0', $multiple = false)
|
public function select_dolgroups($selected = '', $htmlname = 'groupid', $show_empty = 0, $exclude = '', $disabled = 0, $include = '', $enableonly = '', $force_entity = '0', $multiple = false)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $conf,$user,$langs;
|
global $conf,$user,$langs;
|
||||||
@ -7201,7 +7201,7 @@ class Form
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function showFilterButtons()
|
public function showFilterButtons()
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
@ -7220,7 +7220,7 @@ class Form
|
|||||||
* @param int $calljsfunction 0=default. 1=call function initCheckForSelect() after changing status of checkboxes
|
* @param int $calljsfunction 0=default. 1=call function initCheckForSelect() after changing status of checkboxes
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function showCheckAddButtons($cssclass = 'checkforaction', $calljsfunction = 0)
|
public function showCheckAddButtons($cssclass = 'checkforaction', $calljsfunction = 0)
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
@ -7259,7 +7259,7 @@ class Form
|
|||||||
* @param int $calljsfunction 0=default. 1=call function initCheckForSelect() after changing status of checkboxes
|
* @param int $calljsfunction 0=default. 1=call function initCheckForSelect() after changing status of checkboxes
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function showFilterAndCheckAddButtons($addcheckuncheckall = 0, $cssclass = 'checkforaction', $calljsfunction = 0)
|
public function showFilterAndCheckAddButtons($addcheckuncheckall = 0, $cssclass = 'checkforaction', $calljsfunction = 0)
|
||||||
{
|
{
|
||||||
$out.=$this->showFilterButtons();
|
$out.=$this->showFilterButtons();
|
||||||
if ($addcheckuncheckall)
|
if ($addcheckuncheckall)
|
||||||
@ -7281,7 +7281,7 @@ class Form
|
|||||||
* @param array $params param to give
|
* @param array $params param to give
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function selectExpenseCategories($selected = '', $htmlname = 'fk_c_exp_tax_cat', $useempty = 0, $excludeid = array(), $target = '', $default_selected = 0, $params = array())
|
public function selectExpenseCategories($selected = '', $htmlname = 'fk_c_exp_tax_cat', $useempty = 0, $excludeid = array(), $target = '', $default_selected = 0, $params = array())
|
||||||
{
|
{
|
||||||
global $db, $conf, $langs, $user;
|
global $db, $conf, $langs, $user;
|
||||||
|
|
||||||
@ -7370,7 +7370,7 @@ class Form
|
|||||||
* @param integer $useempty 1=Add empty line
|
* @param integer $useempty 1=Add empty line
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function selectExpenseRanges($selected = '', $htmlname = 'fk_range', $useempty = 0)
|
public function selectExpenseRanges($selected = '', $htmlname = 'fk_range', $useempty = 0)
|
||||||
{
|
{
|
||||||
global $db,$conf,$langs;
|
global $db,$conf,$langs;
|
||||||
|
|
||||||
@ -7407,7 +7407,7 @@ class Form
|
|||||||
* @param integer $useid 0=use 'code' as key, 1=use 'id' as key
|
* @param integer $useid 0=use 'code' as key, 1=use 'id' as key
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function selectExpense($selected = '', $htmlname = 'fk_c_type_fees', $useempty = 0, $allchoice = 1, $useid = 0)
|
public function selectExpense($selected = '', $htmlname = 'fk_c_type_fees', $useempty = 0, $allchoice = 1, $useid = 0)
|
||||||
{
|
{
|
||||||
global $db,$langs;
|
global $db,$langs;
|
||||||
|
|
||||||
|
|||||||
@ -76,7 +76,7 @@ class FormSms
|
|||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
*/
|
*/
|
||||||
function __construct($db)
|
public function __construct($db)
|
||||||
{
|
{
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ class FormSms
|
|||||||
$this->withbodyreadonly=0;
|
$this->withbodyreadonly=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Show the form to input an sms.
|
* Show the form to input an sms.
|
||||||
*
|
*
|
||||||
@ -100,7 +100,7 @@ class FormSms
|
|||||||
* @param int $showform Show form tags and submit button (recommanded is to use with value 0)
|
* @param int $showform Show form tags and submit button (recommanded is to use with value 0)
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function show_form($morecss = 'titlefield', $showform = 1)
|
public function show_form($morecss = 'titlefield', $showform = 1)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $conf, $langs, $user, $form;
|
global $conf, $langs, $user, $form;
|
||||||
|
|||||||
@ -32,7 +32,7 @@ class InfoBox
|
|||||||
*
|
*
|
||||||
* @return string[] Array with list of zones
|
* @return string[] Array with list of zones
|
||||||
*/
|
*/
|
||||||
static function getListOfPagesForBoxes()
|
public static function getListOfPagesForBoxes()
|
||||||
{
|
{
|
||||||
return array(0=>'Home');
|
return array(0=>'Home');
|
||||||
}
|
}
|
||||||
@ -48,7 +48,7 @@ class InfoBox
|
|||||||
* @param int $includehidden Include also hidden boxes
|
* @param int $includehidden Include also hidden boxes
|
||||||
* @return array Array of boxes
|
* @return array Array of boxes
|
||||||
*/
|
*/
|
||||||
static function listBoxes($db, $mode, $zone, $user = null, $excludelist = array(), $includehidden = 1)
|
public static function listBoxes($db, $mode, $zone, $user = null, $excludelist = array(), $includehidden = 1)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -186,7 +186,7 @@ class InfoBox
|
|||||||
* @param int $userid Id of user
|
* @param int $userid Id of user
|
||||||
* @return int <0 if KO, 0=Nothing done, > 0 if OK
|
* @return int <0 if KO, 0=Nothing done, > 0 if OK
|
||||||
*/
|
*/
|
||||||
static function saveboxorder($db, $zone, $boxorder, $userid = 0)
|
public static function saveboxorder($db, $zone, $boxorder, $userid = 0)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,7 @@ class Interfaces
|
|||||||
*/
|
*/
|
||||||
public $db;
|
public $db;
|
||||||
|
|
||||||
var $dir; // Directory with all core and external triggers files
|
public $dir; // Directory with all core and external triggers files
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string[] Error codes (or messages)
|
* @var string[] Error codes (or messages)
|
||||||
@ -48,12 +48,12 @@ class Interfaces
|
|||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
*/
|
*/
|
||||||
function __construct($db)
|
public function __construct($db)
|
||||||
{
|
{
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Function called when a Dolibarr business event occurs
|
* Function called when a Dolibarr business event occurs
|
||||||
* This function call all qualified triggers.
|
* This function call all qualified triggers.
|
||||||
@ -65,7 +65,7 @@ class Interfaces
|
|||||||
* @param Conf $conf Objet conf
|
* @param Conf $conf Objet conf
|
||||||
* @return int Nb of triggers ran if no error, -Nb of triggers with errors otherwise.
|
* @return int Nb of triggers ran if no error, -Nb of triggers with errors otherwise.
|
||||||
*/
|
*/
|
||||||
function run_triggers($action, $object, $user, $langs, $conf)
|
public function run_triggers($action, $object, $user, $langs, $conf)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
// Check parameters
|
// Check parameters
|
||||||
@ -241,7 +241,7 @@ class Interfaces
|
|||||||
* @param array $forcedirtriggers null=All default directories. This parameter is used by modulebuilder module only.
|
* @param array $forcedirtriggers null=All default directories. This parameter is used by modulebuilder module only.
|
||||||
* @return array Array list of triggers
|
* @return array Array list of triggers
|
||||||
*/
|
*/
|
||||||
function getTriggersList($forcedirtriggers = null)
|
public function getTriggersList($forcedirtriggers = null)
|
||||||
{
|
{
|
||||||
global $conf, $langs, $db;
|
global $conf, $langs, $db;
|
||||||
|
|
||||||
|
|||||||
@ -42,78 +42,78 @@ class Ldap
|
|||||||
/**
|
/**
|
||||||
* Tableau des serveurs (IP addresses ou nom d'hotes)
|
* Tableau des serveurs (IP addresses ou nom d'hotes)
|
||||||
*/
|
*/
|
||||||
var $server=array();
|
public $server=array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base DN (e.g. "dc=foo,dc=com")
|
* Base DN (e.g. "dc=foo,dc=com")
|
||||||
*/
|
*/
|
||||||
var $dn;
|
public $dn;
|
||||||
/**
|
/**
|
||||||
* type de serveur, actuellement OpenLdap et Active Directory
|
* type de serveur, actuellement OpenLdap et Active Directory
|
||||||
*/
|
*/
|
||||||
var $serverType;
|
public $serverType;
|
||||||
/**
|
/**
|
||||||
* Version du protocole ldap
|
* Version du protocole ldap
|
||||||
*/
|
*/
|
||||||
var $domain;
|
public $domain;
|
||||||
/**
|
/**
|
||||||
* User administrateur Ldap
|
* User administrateur Ldap
|
||||||
* Active Directory ne supporte pas les connexions anonymes
|
* Active Directory ne supporte pas les connexions anonymes
|
||||||
*/
|
*/
|
||||||
var $searchUser;
|
public $searchUser;
|
||||||
/**
|
/**
|
||||||
* Mot de passe de l'administrateur
|
* Mot de passe de l'administrateur
|
||||||
* Active Directory ne supporte pas les connexions anonymes
|
* Active Directory ne supporte pas les connexions anonymes
|
||||||
*/
|
*/
|
||||||
var $searchPassword;
|
public $searchPassword;
|
||||||
/**
|
/**
|
||||||
* DN des utilisateurs
|
* DN des utilisateurs
|
||||||
*/
|
*/
|
||||||
var $people;
|
public $people;
|
||||||
/**
|
/**
|
||||||
* DN des groupes
|
* DN des groupes
|
||||||
*/
|
*/
|
||||||
var $groups;
|
public $groups;
|
||||||
/**
|
/**
|
||||||
* Code erreur retourne par le serveur Ldap
|
* Code erreur retourne par le serveur Ldap
|
||||||
*/
|
*/
|
||||||
var $ldapErrorCode;
|
public $ldapErrorCode;
|
||||||
/**
|
/**
|
||||||
* Message texte de l'erreur
|
* Message texte de l'erreur
|
||||||
*/
|
*/
|
||||||
var $ldapErrorText;
|
public $ldapErrorText;
|
||||||
|
|
||||||
|
|
||||||
//Fetch user
|
//Fetch user
|
||||||
var $name;
|
public $name;
|
||||||
var $firstname;
|
public $firstname;
|
||||||
var $login;
|
public $login;
|
||||||
var $phone;
|
public $phone;
|
||||||
var $skype;
|
public $skype;
|
||||||
var $fax;
|
public $fax;
|
||||||
var $mail;
|
public $mail;
|
||||||
var $mobile;
|
public $mobile;
|
||||||
|
|
||||||
var $uacf;
|
public $uacf;
|
||||||
var $pwdlastset;
|
public $pwdlastset;
|
||||||
|
|
||||||
var $ldapcharset='UTF-8'; // LDAP should be UTF-8 encoded
|
public $ldapcharset='UTF-8'; // LDAP should be UTF-8 encoded
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The internal LDAP connection handle
|
* The internal LDAP connection handle
|
||||||
*/
|
*/
|
||||||
var $connection;
|
public $connection;
|
||||||
/**
|
/**
|
||||||
* Result of any connections etc.
|
* Result of any connections etc.
|
||||||
*/
|
*/
|
||||||
var $result;
|
public $result;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -149,7 +149,7 @@ class Ldap
|
|||||||
|
|
||||||
// Connection handling methods -------------------------------------------
|
// Connection handling methods -------------------------------------------
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Connect and bind
|
* Connect and bind
|
||||||
* Use this->server, this->serverPort, this->ldapProtocolVersion, this->serverType, this->searchUser, this->searchPassword
|
* Use this->server, this->serverPort, this->ldapProtocolVersion, this->serverType, this->searchUser, this->searchPassword
|
||||||
@ -157,7 +157,7 @@ class Ldap
|
|||||||
*
|
*
|
||||||
* @return int <0 if KO, 1 if bind anonymous, 2 if bind auth
|
* @return int <0 if KO, 1 if bind anonymous, 2 if bind auth
|
||||||
*/
|
*/
|
||||||
function connect_bind()
|
public function connect_bind()
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs, $conf;
|
global $langs, $conf;
|
||||||
@ -290,7 +290,7 @@ class Ldap
|
|||||||
*
|
*
|
||||||
* @return boolean true or false
|
* @return boolean true or false
|
||||||
*/
|
*/
|
||||||
function close()
|
public function close()
|
||||||
{
|
{
|
||||||
if ($this->connection && ! @ldap_close($this->connection))
|
if ($this->connection && ! @ldap_close($this->connection))
|
||||||
{
|
{
|
||||||
@ -308,7 +308,7 @@ class Ldap
|
|||||||
*
|
*
|
||||||
* @return boolean true or false
|
* @return boolean true or false
|
||||||
*/
|
*/
|
||||||
function bind()
|
public function bind()
|
||||||
{
|
{
|
||||||
if (! $this->result=@ldap_bind($this->connection))
|
if (! $this->result=@ldap_bind($this->connection))
|
||||||
{
|
{
|
||||||
@ -333,7 +333,7 @@ class Ldap
|
|||||||
* @param string $pass Password
|
* @param string $pass Password
|
||||||
* @return boolean true or false
|
* @return boolean true or false
|
||||||
*/
|
*/
|
||||||
function bindauth($bindDn, $pass)
|
public function bindauth($bindDn, $pass)
|
||||||
{
|
{
|
||||||
if (! $this->result = @ldap_bind($this->connection, $bindDn, $pass))
|
if (! $this->result = @ldap_bind($this->connection, $bindDn, $pass))
|
||||||
{
|
{
|
||||||
@ -353,7 +353,7 @@ class Ldap
|
|||||||
*
|
*
|
||||||
* @return boolean true or false
|
* @return boolean true or false
|
||||||
*/
|
*/
|
||||||
function unbind()
|
public function unbind()
|
||||||
{
|
{
|
||||||
if (!$this->result=@ldap_unbind($this->connection))
|
if (!$this->result=@ldap_unbind($this->connection))
|
||||||
{
|
{
|
||||||
@ -369,7 +369,7 @@ class Ldap
|
|||||||
*
|
*
|
||||||
* @return string version
|
* @return string version
|
||||||
*/
|
*/
|
||||||
function getVersion()
|
public function getVersion()
|
||||||
{
|
{
|
||||||
$version = 0;
|
$version = 0;
|
||||||
$version = @ldap_get_option($this->connection, LDAP_OPT_PROTOCOL_VERSION, $version);
|
$version = @ldap_get_option($this->connection, LDAP_OPT_PROTOCOL_VERSION, $version);
|
||||||
@ -410,7 +410,7 @@ class Ldap
|
|||||||
* @param User $user Objet user that create
|
* @param User $user Objet user that create
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function add($dn, $info, $user)
|
public function add($dn, $info, $user)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -464,7 +464,7 @@ class Ldap
|
|||||||
* @param User $user Objet user that modify
|
* @param User $user Objet user that modify
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function modify($dn, $info, $user)
|
public function modify($dn, $info, $user)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -518,7 +518,7 @@ class Ldap
|
|||||||
* @param bool $deleteoldrdn If true the old RDN value(s) is removed, else the old RDN value(s) is retained as non-distinguished values of the entry.
|
* @param bool $deleteoldrdn If true the old RDN value(s) is removed, else the old RDN value(s) is retained as non-distinguished values of the entry.
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function rename($dn, $newrdn, $newparent, $user, $deleteoldrdn = true)
|
public function rename($dn, $newrdn, $newparent, $user, $deleteoldrdn = true)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -569,7 +569,7 @@ class Ldap
|
|||||||
* @param string $newparent New parent (ou=xxx,dc=aaa,dc=bbb) (for ldap_rename)
|
* @param string $newparent New parent (ou=xxx,dc=aaa,dc=bbb) (for ldap_rename)
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function update($dn, $info, $user, $olddn, $newrdn = false, $newparent = false)
|
public function update($dn, $info, $user, $olddn, $newrdn = false, $newparent = false)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -629,7 +629,7 @@ class Ldap
|
|||||||
* @param string $dn DN entry key
|
* @param string $dn DN entry key
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function delete($dn)
|
public function delete($dn)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -656,7 +656,7 @@ class Ldap
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Build a LDAP message
|
* Build a LDAP message
|
||||||
*
|
*
|
||||||
@ -664,7 +664,7 @@ class Ldap
|
|||||||
* @param array $info Attributes array
|
* @param array $info Attributes array
|
||||||
* @return string Content of file
|
* @return string Content of file
|
||||||
*/
|
*/
|
||||||
function dump_content($dn, $info)
|
public function dump_content($dn, $info)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
$content='';
|
$content='';
|
||||||
@ -707,7 +707,7 @@ class Ldap
|
|||||||
* @param array $info Attributes array
|
* @param array $info Attributes array
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function dump($dn, $info)
|
public function dump($dn, $info)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -741,7 +741,7 @@ class Ldap
|
|||||||
* @param int $timeout Timeout in second (default 1s)
|
* @param int $timeout Timeout in second (default 1s)
|
||||||
* @return boolean true or false
|
* @return boolean true or false
|
||||||
*/
|
*/
|
||||||
function serverPing($host, $port = 389, $timeout = 1)
|
public function serverPing($host, $port = 389, $timeout = 1)
|
||||||
{
|
{
|
||||||
// Replace ldaps:// by ssl://
|
// Replace ldaps:// by ssl://
|
||||||
if (preg_match('/^ldaps:\/\/([^\/]+)\/?$/', $host, $regs)) {
|
if (preg_match('/^ldaps:\/\/([^\/]+)\/?$/', $host, $regs)) {
|
||||||
@ -771,7 +771,7 @@ class Ldap
|
|||||||
* @param User $user Objet user that create
|
* @param User $user Objet user that create
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function addAttribute($dn, $info, $user)
|
public function addAttribute($dn, $info, $user)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -823,7 +823,7 @@ class Ldap
|
|||||||
* @param User $user Objet user that create
|
* @param User $user Objet user that create
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function updateAttribute($dn, $info, $user)
|
public function updateAttribute($dn, $info, $user)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -875,7 +875,7 @@ class Ldap
|
|||||||
* @param User $user Objet user that create
|
* @param User $user Objet user that create
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function deleteAttribute($dn, $info, $user)
|
public function deleteAttribute($dn, $info, $user)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -925,7 +925,7 @@ class Ldap
|
|||||||
* @param string $filter Filter
|
* @param string $filter Filter
|
||||||
* @return int|array <0 or false if KO, array if OK
|
* @return int|array <0 or false if KO, array if OK
|
||||||
*/
|
*/
|
||||||
function getAttribute($dn, $filter)
|
public function getAttribute($dn, $filter)
|
||||||
{
|
{
|
||||||
// Check parameters
|
// Check parameters
|
||||||
if (! $this->connection)
|
if (! $this->connection)
|
||||||
@ -970,7 +970,7 @@ class Ldap
|
|||||||
* @param string $attribute Attributes
|
* @param string $attribute Attributes
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function getAttributeValues($filterrecord, $attribute)
|
public function getAttributeValues($filterrecord, $attribute)
|
||||||
{
|
{
|
||||||
$attributes=array();
|
$attributes=array();
|
||||||
$attributes[0] = $attribute;
|
$attributes[0] = $attribute;
|
||||||
@ -1015,7 +1015,7 @@ class Ldap
|
|||||||
* @param array $attributeAsArray Array of fields wanted as an array not a string
|
* @param array $attributeAsArray Array of fields wanted as an array not a string
|
||||||
* @return array Array of [id_record][ldap_field]=value
|
* @return array Array of [id_record][ldap_field]=value
|
||||||
*/
|
*/
|
||||||
function getRecords($search, $userDn, $useridentifier, $attributeArray, $activefilter = 0, $attributeAsArray = array())
|
public function getRecords($search, $userDn, $useridentifier, $attributeArray, $activefilter = 0, $attributeAsArray = array())
|
||||||
{
|
{
|
||||||
$fulllist=array();
|
$fulllist=array();
|
||||||
|
|
||||||
@ -1123,7 +1123,7 @@ class Ldap
|
|||||||
* @param string $hex Hex value
|
* @param string $hex Hex value
|
||||||
* @return string Little endian
|
* @return string Little endian
|
||||||
*/
|
*/
|
||||||
function littleEndian($hex)
|
public function littleEndian($hex)
|
||||||
{
|
{
|
||||||
for ($x=dol_strlen($hex)-2; $x >= 0; $x=$x-2) {
|
for ($x=dol_strlen($hex)-2; $x >= 0; $x=$x-2) {
|
||||||
$result .= substr($hex, $x, 2);
|
$result .= substr($hex, $x, 2);
|
||||||
@ -1139,7 +1139,7 @@ class Ldap
|
|||||||
* @param string $ldapUser Login de l'utilisateur
|
* @param string $ldapUser Login de l'utilisateur
|
||||||
* @return string Sid
|
* @return string Sid
|
||||||
*/
|
*/
|
||||||
function getObjectSid($ldapUser)
|
public function getObjectSid($ldapUser)
|
||||||
{
|
{
|
||||||
$criteria = '('.$this->getUserIdentifier().'='.$ldapUser.')';
|
$criteria = '('.$this->getUserIdentifier().'='.$ldapUser.')';
|
||||||
$justthese = array("objectsid");
|
$justthese = array("objectsid");
|
||||||
@ -1198,7 +1198,7 @@ class Ldap
|
|||||||
* @param string $binsid Binary SID
|
* @param string $binsid Binary SID
|
||||||
* @return string Textual SID
|
* @return string Textual SID
|
||||||
*/
|
*/
|
||||||
function binSIDtoText($binsid)
|
public function binSIDtoText($binsid)
|
||||||
{
|
{
|
||||||
$hex_sid=bin2hex($binsid);
|
$hex_sid=bin2hex($binsid);
|
||||||
$rev = hexdec(substr($hex_sid, 0, 2)); // Get revision-part of SID
|
$rev = hexdec(substr($hex_sid, 0, 2)); // Get revision-part of SID
|
||||||
@ -1224,7 +1224,7 @@ class Ldap
|
|||||||
* @param string $filter Search filter (ex: (sn=nom_personne) )
|
* @param string $filter Search filter (ex: (sn=nom_personne) )
|
||||||
* @return array|int Array with answers (key lowercased - value)
|
* @return array|int Array with answers (key lowercased - value)
|
||||||
*/
|
*/
|
||||||
function search($checkDn, $filter)
|
public function search($checkDn, $filter)
|
||||||
{
|
{
|
||||||
dol_syslog(get_class($this)."::search checkDn=".$checkDn." filter=".$filter);
|
dol_syslog(get_class($this)."::search checkDn=".$checkDn." filter=".$filter);
|
||||||
|
|
||||||
@ -1260,7 +1260,7 @@ class Ldap
|
|||||||
* Examples: &(objectClass=inetOrgPerson) &(objectClass=user)(objectCategory=person) &(isMemberOf=cn=Sales,ou=Groups,dc=opencsi,dc=com)
|
* Examples: &(objectClass=inetOrgPerson) &(objectClass=user)(objectCategory=person) &(isMemberOf=cn=Sales,ou=Groups,dc=opencsi,dc=com)
|
||||||
* @return int >0 if OK, <0 if KO
|
* @return int >0 if OK, <0 if KO
|
||||||
*/
|
*/
|
||||||
function fetch($user, $filter)
|
public function fetch($user, $filter)
|
||||||
{
|
{
|
||||||
// Perform the search and get the entry handles
|
// Perform the search and get the entry handles
|
||||||
|
|
||||||
@ -1353,7 +1353,7 @@ class Ldap
|
|||||||
*
|
*
|
||||||
* @return string Login
|
* @return string Login
|
||||||
*/
|
*/
|
||||||
function getUserIdentifier()
|
public function getUserIdentifier()
|
||||||
{
|
{
|
||||||
if ($this->serverType == "activedirectory") {
|
if ($this->serverType == "activedirectory") {
|
||||||
return $this->attr_sambalogin;
|
return $this->attr_sambalogin;
|
||||||
@ -1368,7 +1368,7 @@ class Ldap
|
|||||||
* @param string $uacf UACF
|
* @param string $uacf UACF
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function parseUACF($uacf)
|
public function parseUACF($uacf)
|
||||||
{
|
{
|
||||||
//All flags array
|
//All flags array
|
||||||
$flags = array(
|
$flags = array(
|
||||||
@ -1414,7 +1414,7 @@ class Ldap
|
|||||||
* @param string $samtype SamType
|
* @param string $samtype SamType
|
||||||
* @return string Sam string
|
* @return string Sam string
|
||||||
*/
|
*/
|
||||||
function parseSAT($samtype)
|
public function parseSAT($samtype)
|
||||||
{
|
{
|
||||||
$stypes = array(
|
$stypes = array(
|
||||||
805306368 => "NORMAL_ACCOUNT",
|
805306368 => "NORMAL_ACCOUNT",
|
||||||
@ -1438,14 +1438,14 @@ class Ldap
|
|||||||
return($retval);
|
return($retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Convertit le temps ActiveDirectory en Unix timestamp
|
* Convertit le temps ActiveDirectory en Unix timestamp
|
||||||
*
|
*
|
||||||
* @param string $value AD time to convert
|
* @param string $value AD time to convert
|
||||||
* @return integer Unix timestamp
|
* @return integer Unix timestamp
|
||||||
*/
|
*/
|
||||||
function convert_time($value)
|
public function convert_time($value)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
$dateLargeInt=$value; // nano secondes depuis 1601 !!!!
|
$dateLargeInt=$value; // nano secondes depuis 1601 !!!!
|
||||||
@ -1478,7 +1478,7 @@ class Ldap
|
|||||||
* @param string $pagecodeto Page code for result string
|
* @param string $pagecodeto Page code for result string
|
||||||
* @return string Converted string
|
* @return string Converted string
|
||||||
*/
|
*/
|
||||||
function convFromOutputCharset($str, $pagecodeto = 'UTF-8')
|
public function convFromOutputCharset($str, $pagecodeto = 'UTF-8')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
if ($pagecodeto == 'ISO-8859-1' && $conf->file->character_set_client == 'UTF-8') $str=utf8_decode($str);
|
if ($pagecodeto == 'ISO-8859-1' && $conf->file->character_set_client == 'UTF-8') $str=utf8_decode($str);
|
||||||
@ -1493,7 +1493,7 @@ class Ldap
|
|||||||
* @param string $keygroup Key of group
|
* @param string $keygroup Key of group
|
||||||
* @return int gid number
|
* @return int gid number
|
||||||
*/
|
*/
|
||||||
function getNextGroupGid($keygroup = 'LDAP_KEY_GROUPS')
|
public function getNextGroupGid($keygroup = 'LDAP_KEY_GROUPS')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
|||||||
@ -28,12 +28,12 @@
|
|||||||
*/
|
*/
|
||||||
class Menu
|
class Menu
|
||||||
{
|
{
|
||||||
var $liste;
|
public $liste;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->liste = array();
|
$this->liste = array();
|
||||||
}
|
}
|
||||||
@ -43,7 +43,7 @@ class Menu
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function clear()
|
public function clear()
|
||||||
{
|
{
|
||||||
$this->liste = array();
|
$this->liste = array();
|
||||||
}
|
}
|
||||||
@ -65,7 +65,7 @@ class Menu
|
|||||||
* @param string $prefix Prefix to title (image or picto)
|
* @param string $prefix Prefix to title (image or picto)
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function add($url, $titre, $level = 0, $enabled = 1, $target = '', $mainmenu = '', $leftmenu = '', $position = 0, $id = '', $idsel = '', $classname = '', $prefix = '')
|
public function add($url, $titre, $level = 0, $enabled = 1, $target = '', $mainmenu = '', $leftmenu = '', $position = 0, $id = '', $idsel = '', $classname = '', $prefix = '')
|
||||||
{
|
{
|
||||||
$this->liste[]=array('url'=>$url,'titre'=>$titre,'level'=>$level,'enabled'=>$enabled,'target'=>$target,'mainmenu'=>$mainmenu,'leftmenu'=>$leftmenu, 'position'=>$position, 'id'=>$id, 'idsel'=>$idsel, 'classname'=>$classname, 'prefix'=>$prefix);
|
$this->liste[]=array('url'=>$url,'titre'=>$titre,'level'=>$level,'enabled'=>$enabled,'target'=>$target,'mainmenu'=>$mainmenu,'leftmenu'=>$leftmenu, 'position'=>$position, 'id'=>$id, 'idsel'=>$idsel, 'classname'=>$classname, 'prefix'=>$prefix);
|
||||||
}
|
}
|
||||||
@ -88,7 +88,7 @@ class Menu
|
|||||||
* @param string $prefix Prefix to title (image or picto)
|
* @param string $prefix Prefix to title (image or picto)
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function insert($idafter, $url, $titre, $level = 0, $enabled = 1, $target = '', $mainmenu = '', $leftmenu = '', $position = 0, $id = '', $idsel = '', $classname = '', $prefix = '')
|
public function insert($idafter, $url, $titre, $level = 0, $enabled = 1, $target = '', $mainmenu = '', $leftmenu = '', $position = 0, $id = '', $idsel = '', $classname = '', $prefix = '')
|
||||||
{
|
{
|
||||||
$array_start = array_slice($this->liste, 0, ($idafter+1));
|
$array_start = array_slice($this->liste, 0, ($idafter+1));
|
||||||
$array_new = array(0=>array('url'=>$url,'titre'=>$titre,'level'=>$level,'enabled'=>$enabled,'target'=>$target,'mainmenu'=>$mainmenu,'leftmenu'=>$leftmenu,'position'=>$position, 'id'=>$id, 'idsel'=>$idsel, 'classname'=>$classname, 'prefix'=>$prefix));
|
$array_new = array(0=>array('url'=>$url,'titre'=>$titre,'level'=>$level,'enabled'=>$enabled,'target'=>$target,'mainmenu'=>$mainmenu,'leftmenu'=>$leftmenu,'position'=>$position, 'id'=>$id, 'idsel'=>$idsel, 'classname'=>$classname, 'prefix'=>$prefix));
|
||||||
@ -96,13 +96,13 @@ class Menu
|
|||||||
$this->liste=array_merge($array_start, $array_new, $array_end);
|
$this->liste=array_merge($array_start, $array_new, $array_end);
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Remove a menu entry from this->liste
|
* Remove a menu entry from this->liste
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function remove_last()
|
public function remove_last()
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
if (count($this->liste) > 1) {
|
if (count($this->liste) > 1) {
|
||||||
@ -115,7 +115,7 @@ class Menu
|
|||||||
*
|
*
|
||||||
* @return int Number of visible (gray or not) menu entries
|
* @return int Number of visible (gray or not) menu entries
|
||||||
*/
|
*/
|
||||||
function getNbOfVisibleMenuEntries()
|
public function getNbOfVisibleMenuEntries()
|
||||||
{
|
{
|
||||||
$nb=0;
|
$nb=0;
|
||||||
foreach($this->liste as $val)
|
foreach($this->liste as $val)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user