mark non camelCaps function

This commit is contained in:
Frédéric FRANCE 2018-08-13 17:26:32 +02:00
parent 6a8ed56c3d
commit 850ac34020
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
276 changed files with 1792 additions and 817 deletions

View File

@ -346,9 +346,9 @@
<severity>0</severity> <severity>0</severity>
</rule> </rule>
<rule ref="PEAR.NamingConventions.ValidFunctionName.NotCamelCaps"> <!--<rule ref="PEAR.NamingConventions.ValidFunctionName.NotCamelCaps">
<severity>0</severity> <severity>0</severity>
</rule> </rule>-->
<rule ref="PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps"> <rule ref="PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps">
<severity>0</severity> <severity>0</severity>
</rule> </rule>

View File

@ -130,4 +130,4 @@ class AccountancySystem
return $result; return $result;
} }
} }

View File

@ -494,6 +494,7 @@ class AccountingAccount extends CommonObject
* @param int $id Id * @param int $id Id
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function account_desactivate($id) { function account_desactivate($id) {
$result = $this->checkUsage(); $result = $this->checkUsage();
@ -526,6 +527,7 @@ class AccountingAccount extends CommonObject
* @param int $id Id * @param int $id Id
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function account_activate($id) { function account_activate($id) {
$this->db->begin(); $this->db->begin();
@ -564,6 +566,7 @@ class AccountingAccount extends CommonObject
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Label of status * @return string Label of status
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode=0) function LibStatut($statut,$mode=0)
{ {
global $langs; global $langs;

View File

@ -252,6 +252,7 @@ class AccountingJournal extends CommonObject
* @param int $mode 0=libelle long, 1=libelle court * @param int $mode 0=libelle long, 1=libelle court
* @return string Label of type * @return string Label of type
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibType($nature,$mode=0) function LibType($nature,$mode=0)
{ {
global $langs; global $langs;

View File

@ -1539,6 +1539,7 @@ class BookKeeping extends CommonObject
* @param string $model Model * @param string $model Model
* @return int Result * @return int Result
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function export_bookkeping($model = 'ebp') { function export_bookkeping($model = 'ebp') {
global $conf; global $conf;
@ -1695,7 +1696,8 @@ class BookKeeping extends CommonObject
* @param int $select_out Set value returned by select 0=rowid (default), 1=account_number * @param int $select_out Set value returned by select 0=rowid (default), 1=account_number
* @param int $aabase Set accounting_account base class to display empty=all or from 1 to 8 will display only account beginning by this number * @param int $aabase Set accounting_account base class to display empty=all or from 1 to 8 will display only account beginning by this number
* @return string String with HTML select * @return string String with HTML select
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $aabase = '') { function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $aabase = '') {
global $conf; global $conf;
@ -1759,6 +1761,7 @@ class BookKeeping extends CommonObject
* @param string $account Accounting account * @param string $account Accounting account
* @return string Root account * @return string Root account
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_compte_racine($account = null) function get_compte_racine($account = null)
{ {
global $conf; global $conf;
@ -1799,6 +1802,7 @@ class BookKeeping extends CommonObject
* @param string $account Accounting account * @param string $account Accounting account
* @return string Account desc * @return string Account desc
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_compte_desc($account = null) function get_compte_desc($account = null)
{ {
global $conf; global $conf;

View File

@ -76,6 +76,7 @@ abstract class ActionsAdherentCardCommon
* @param int $id Id * @param int $id Id
* @return string HTML output * @return string HTML output
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function assign_values(&$action, $id) function assign_values(&$action, $id)
{ {
global $conf, $langs, $user, $canvas; global $conf, $langs, $user, $canvas;
@ -231,6 +232,7 @@ abstract class ActionsAdherentCardCommon
* *
* @return string HTML output * @return string HTML output
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
private function assign_post() private function assign_post()
{ {
global $langs, $mysoc; global $langs, $mysoc;

View File

@ -74,6 +74,7 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon
* @param int $id Id * @param int $id Id
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function assign_values(&$action, $id) function assign_values(&$action, $id)
{ {
global $limit, $offset, $sortfield, $sortorder; global $limit, $offset, $sortfield, $sortorder;
@ -130,6 +131,7 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon
* @param string $sortorder Sort order ('ASC' or 'DESC') * @param string $sortorder Sort order ('ASC' or 'DESC')
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LoadListDatas($limit, $offset, $sortfield, $sortorder) function LoadListDatas($limit, $offset, $sortfield, $sortorder)
{ {
global $conf, $langs; global $conf, $langs;
@ -139,4 +141,3 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon
$this->list_datas = array(); $this->list_datas = array();
} }
} }

View File

@ -139,6 +139,7 @@ class Adherent extends CommonObject
* @param string $errors_to erros to * @param string $errors_to erros to
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function send_an_email($text, $subject, $filename_list=array(), $mimetype_list=array(), $mimefilename_list=array(), $addr_cc="", $addr_bcc="", $deliveryreceipt=0, $msgishtml=-1, $errors_to='') function send_an_email($text, $subject, $filename_list=array(), $mimetype_list=array(), $mimefilename_list=array(), $addr_cc="", $addr_bcc="", $deliveryreceipt=0, $msgishtml=-1, $errors_to='')
{ {
global $conf,$langs; global $conf,$langs;
@ -629,6 +630,7 @@ class Adherent extends CommonObject
* @param User $user User making change * @param User $user User making change
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_end_date($user) function update_end_date($user)
{ {
$this->db->begin(); $this->db->begin();
@ -983,6 +985,7 @@ class Adherent extends CommonObject
* @param string $login login of member * @param string $login login of member
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_login($login) function fetch_login($login)
{ {
global $conf; global $conf;
@ -1013,6 +1016,7 @@ class Adherent extends CommonObject
* @param string $lastname Lastname * @param string $lastname Lastname
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_name($firstname,$lastname) function fetch_name($firstname,$lastname)
{ {
global $conf; global $conf;
@ -1186,6 +1190,7 @@ class Adherent extends CommonObject
* *
* @return int <0 si KO, >0 si OK * @return int <0 si KO, >0 si OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_subscriptions() function fetch_subscriptions()
{ {
global $langs; global $langs;
@ -1736,6 +1741,7 @@ class Adherent extends CommonObject
* *
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_to_abo() function add_to_abo()
{ {
global $conf,$langs; global $conf,$langs;
@ -1793,6 +1799,7 @@ class Adherent extends CommonObject
* *
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function del_to_abo() function del_to_abo()
{ {
global $conf,$langs; global $conf,$langs;
@ -1976,6 +1983,7 @@ class Adherent extends CommonObject
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Label * @return string Label
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$need_subscription,$date_end_subscription,$mode=0) function LibStatut($statut,$need_subscription,$date_end_subscription,$mode=0)
{ {
global $langs; global $langs;
@ -2065,6 +2073,7 @@ class Adherent extends CommonObject
* *
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_state_board() function load_state_board()
{ {
global $conf; global $conf;
@ -2101,6 +2110,7 @@ class Adherent extends CommonObject
* @param User $user Objet user * @param User $user Objet user
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_board($user) function load_board($user)
{ {
global $conf, $langs; global $conf, $langs;
@ -2246,6 +2256,7 @@ class Adherent extends CommonObject
* 2=Return key only (uid=qqq) * 2=Return key only (uid=qqq)
* @return string DN * @return string DN
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _load_ldap_dn($info,$mode=0) function _load_ldap_dn($info,$mode=0)
{ {
global $conf; global $conf;
@ -2262,6 +2273,7 @@ class Adherent extends CommonObject
* *
* @return array Tableau info des attributs * @return array Tableau info des attributs
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _load_ldap_info() function _load_ldap_info()
{ {
global $conf,$langs; global $conf,$langs;

View File

@ -287,6 +287,7 @@ class AdherentType extends CommonObject
* *
* @return array List of types of members * @return array List of types of members
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function liste_array() function liste_array()
{ {
global $conf,$langs; global $conf,$langs;
@ -422,6 +423,7 @@ class AdherentType extends CommonObject
* 2=Return key only (uid=qqq) * 2=Return key only (uid=qqq)
* @return string DN * @return string DN
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _load_ldap_dn($info,$mode=0) function _load_ldap_dn($info,$mode=0)
{ {
global $conf; global $conf;
@ -438,6 +440,7 @@ class AdherentType extends CommonObject
* *
* @return array Tableau info des attributs * @return array Tableau info des attributs
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _load_ldap_info() function _load_ldap_info()
{ {
global $conf,$langs; global $conf,$langs;

View File

@ -361,6 +361,7 @@ class Subscription extends CommonObject
* @param int $statut Id statut * @param int $statut Id statut
* @return string Label * @return string Label
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut) function LibStatut($statut)
{ {
global $langs; global $langs;

View File

@ -160,6 +160,7 @@ class Dolistore
* @param int $parent Id of parent category * @param int $parent Id of parent category
* @return string * @return string
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_categories($parent = 0) function get_categories($parent = 0)
{ {
if (!isset($this->categories)) die('not possible'); if (!isset($this->categories)) die('not possible');
@ -206,6 +207,7 @@ class Dolistore
* *
* @return string HTML output * @return string HTML output
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_products() function get_products()
{ {
global $langs, $conf; global $langs, $conf;
@ -282,16 +284,19 @@ class Dolistore
return $html; return $html;
} }
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_previous_link($text = '<<') function get_previous_link($text = '<<')
{ {
return '<a href="'.$this->get_previous_url().'" class="button">'.$text.'</a>'; return '<a href="'.$this->get_previous_url().'" class="button">'.$text.'</a>';
} }
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_next_link($text = '>>') function get_next_link($text = '>>')
{ {
return '<a href="'.$this->get_next_url().'" class="button">'.$text.'</a>'; return '<a href="'.$this->get_next_url().'" class="button">'.$text.'</a>';
} }
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_previous_url() function get_previous_url()
{ {
$param_array = array(); $param_array = array();
@ -309,6 +314,7 @@ class Dolistore
return $this->url."&".$param; return $this->url."&".$param;
} }
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_next_url() function get_next_url()
{ {
$param_array = array(); $param_array = array();
@ -326,6 +332,7 @@ class Dolistore
return $this->url."&".$param; return $this->url."&".$param;
} }
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function version_compare($v1, $v2) function version_compare($v1, $v2)
{ {
$v1 = explode('.', $v1); $v1 = explode('.', $v1);
@ -355,4 +362,3 @@ class Dolistore
return $ret; return $ret;
} }
} }

View File

@ -273,6 +273,7 @@ class DolibarrApi
* @param array $matches Array of found string by regex search * @param array $matches Array of found string by regex search
* @return string Forged criteria. Example: "t.field like 'abc%'" * @return string Forged criteria. Example: "t.field like 'abc%'"
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function _forge_criteria_callback($matches) static function _forge_criteria_callback($matches)
{ {
global $db; global $db;

View File

@ -336,6 +336,7 @@ class Asset 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, 6=Long 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, 6=Long label + Picto
* @return string Label of status * @return string Label of status
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function LibStatut($status,$mode=0) static function LibStatut($status,$mode=0)
{ {
global $langs; global $langs;
@ -461,4 +462,4 @@ class Asset extends CommonObject
return 0; return 0;
} }
} }

View File

@ -279,6 +279,7 @@ class AssetType extends CommonObject
* *
* @return array List of types of members * @return array List of types of members
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function liste_array() function liste_array()
{ {
global $conf,$langs; global $conf,$langs;

View File

@ -330,4 +330,4 @@ class BlockedLogAuthority
return 1; return 1;
} }
} }

View File

@ -1055,4 +1055,3 @@ class BlockedLog
} }
} }

View File

@ -635,6 +635,7 @@ class Categorie extends CommonObject
* @param string $type Type of category ('product', ...) * @param string $type Type of category ('product', ...)
* @return int 1 : OK, -1 : erreur SQL, -2 : id not defined, -3 : Already linked * @return int 1 : OK, -1 : erreur SQL, -2 : id not defined, -3 : Already linked
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_type($obj, $type) function add_type($obj, $type)
{ {
global $user,$langs,$conf; global $user,$langs,$conf;
@ -737,6 +738,7 @@ class Categorie extends CommonObject
* *
* @return int 1 if OK, -1 if KO * @return int 1 if OK, -1 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function del_type($obj,$type) function del_type($obj,$type)
{ {
global $user,$langs,$conf; global $user,$langs,$conf;
@ -957,6 +959,7 @@ class Categorie extends CommonObject
* *
* @return array|int <0 KO, array ok * @return array|int <0 KO, array ok
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_filles() function get_filles()
{ {
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."categorie"; $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."categorie";
@ -986,6 +989,7 @@ class Categorie extends CommonObject
* *
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
private function load_motherof() private function load_motherof()
{ {
global $conf; global $conf;
@ -1030,6 +1034,7 @@ class Categorie extends CommonObject
* *
* @return array Array of categories. this->cats and this->motherof are set. * @return array Array of categories. this->cats and this->motherof are set.
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_full_arbo($type, $markafterid=0) function get_full_arbo($type, $markafterid=0)
{ {
global $conf, $langs; global $conf, $langs;
@ -1113,6 +1118,7 @@ class Categorie extends CommonObject
* @param int $protection Deep counter to avoid infinite loop * @param int $protection Deep counter to avoid infinite loop
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function build_path_from_id_categ($id_categ,$protection=1000) function build_path_from_id_categ($id_categ,$protection=1000)
{ {
dol_syslog(get_class($this)."::build_path_from_id_categ id_categ=".$id_categ." protection=".$protection, LOG_DEBUG); dol_syslog(get_class($this)."::build_path_from_id_categ id_categ=".$id_categ." protection=".$protection, LOG_DEBUG);
@ -1153,6 +1159,7 @@ class Categorie extends CommonObject
* *
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function debug_cats() function debug_cats()
{ {
// Display $this->cats // Display $this->cats
@ -1176,6 +1183,7 @@ class Categorie extends CommonObject
* @param boolean $parent Just parent categories if true * @param boolean $parent Just parent categories if true
* @return array Table of Object Category * @return array Table of Object Category
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_all_categories($type=null, $parent=false) function get_all_categories($type=null, $parent=false)
{ {
if (! is_numeric($type)) $type = $this->MAP_ID[$type]; if (! is_numeric($type)) $type = $this->MAP_ID[$type];
@ -1211,6 +1219,7 @@ class Categorie extends CommonObject
* *
* @return integer 1 if already exist, 0 otherwise, -1 if error * @return integer 1 if already exist, 0 otherwise, -1 if error
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function already_exists() function already_exists()
{ {
$type=$this->type; $type=$this->type;
@ -1261,6 +1270,7 @@ class Categorie extends CommonObject
* @param int $type Type of category (0, 1, ...) * @param int $type Type of category (0, 1, ...)
* @return array * @return array
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_main_categories($type=null) function get_main_categories($type=null)
{ {
return $this->get_all_categories($type, true); return $this->get_all_categories($type, true);
@ -1275,6 +1285,7 @@ class Categorie extends CommonObject
* @param int $nocolor 0 * @param int $nocolor 0
* @return array * @return array
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function print_all_ways($sep = " &gt;&gt; ", $url='', $nocolor=0) function print_all_ways($sep = " &gt;&gt; ", $url='', $nocolor=0)
{ {
$ways = array(); $ways = array();
@ -1328,6 +1339,7 @@ class Categorie extends CommonObject
* *
* @return int|array <0 KO, array OK * @return int|array <0 KO, array OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_meres() function get_meres()
{ {
$parents = array(); $parents = array();
@ -1363,6 +1375,7 @@ class Categorie extends CommonObject
* *
* @return array * @return array
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_all_ways() function get_all_ways()
{ {
$ways = array(); $ways = array();
@ -1578,6 +1591,7 @@ class Categorie extends CommonObject
* @param string $file Nom du fichier uploade * @param string $file Nom du fichier uploade
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_photo($sdir, $file) function add_photo($sdir, $file)
{ {
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
@ -1627,6 +1641,7 @@ class Categorie extends CommonObject
* @param int $nbmax Nombre maximum de photos (0=pas de max) * @param int $nbmax Nombre maximum de photos (0=pas de max)
* @return array Tableau de photos * @return array Tableau de photos
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function liste_photos($dir,$nbmax=0) function liste_photos($dir,$nbmax=0)
{ {
include_once DOL_DOCUMENT_ROOT .'/core/lib/files.lib.php'; include_once DOL_DOCUMENT_ROOT .'/core/lib/files.lib.php';
@ -1681,6 +1696,7 @@ class Categorie extends CommonObject
* @param string $file Path to file * @param string $file Path to file
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function delete_photo($file) function delete_photo($file)
{ {
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
@ -1709,6 +1725,7 @@ class Categorie extends CommonObject
* @param string $file Path to file * @param string $file Path to file
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_image_size($file) function get_image_size($file)
{ {
$infoImg = getimagesize($file); // Recuperation des infos de l'image $infoImg = getimagesize($file); // Recuperation des infos de l'image

View File

@ -5,7 +5,7 @@
* Copyright (C) 2011-2017 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2011-2017 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com> * Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or * the Free Software Foundation; either version 3 of the License, or
@ -688,6 +688,7 @@ class ActionComm extends CommonObject
* *
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_userassigned() function fetch_userassigned()
{ {
$sql ="SELECT fk_actioncomm, element_type, fk_element, answer_status, mandatory, transparency"; $sql ="SELECT fk_actioncomm, element_type, fk_element, answer_status, mandatory, transparency";
@ -1012,6 +1013,7 @@ class ActionComm extends CommonObject
* @param int $load_state_board Charge indicateurs this->nb de tableau de bord * @param int $load_state_board Charge indicateurs this->nb de tableau de bord
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_board($user, $load_state_board=0) function load_board($user, $load_state_board=0)
{ {
global $conf, $langs; global $conf, $langs;
@ -1138,6 +1140,7 @@ class ActionComm extends CommonObject
* @param int $datestart Date start of event * @param int $datestart Date start of event
* @return string Label * @return string Label
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($percent,$mode,$hidenastatus=0,$datestart='') function LibStatut($percent,$mode,$hidenastatus=0,$datestart='')
{ {
global $langs; global $langs;
@ -1223,7 +1226,7 @@ class ActionComm extends CommonObject
if ((!$user->rights->agenda->allactions->read && $this->author->id != $user->id) || (!$user->rights->agenda->myactions->read && $this->author->id == $user->id)) if ((!$user->rights->agenda->allactions->read && $this->author->id != $user->id) || (!$user->rights->agenda->myactions->read && $this->author->id == $user->id))
$option = 'nolink'; $option = 'nolink';
$label = $this->label; $label = $this->label;
if (empty($label)) $label=$this->libelle; // For backward compatibility if (empty($label)) $label=$this->libelle; // For backward compatibility
@ -1347,6 +1350,7 @@ class ActionComm extends CommonObject
* @param array $filters Array of filters. Exemple array('notolderthan'=>99, 'year'=>..., 'idfrom'=>..., 'notactiontype'=>'systemauto', 'project'=>123, ...) * @param array $filters Array of filters. Exemple array('notolderthan'=>99, 'year'=>..., 'idfrom'=>..., 'notactiontype'=>'systemauto', 'project'=>123, ...)
* @return int <0 if error, nb of events in new file if ok * @return int <0 if error, nb of events in new file if ok
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function build_exportfile($format,$type,$cachedelay,$filename,$filters) function build_exportfile($format,$type,$cachedelay,$filename,$filters)
{ {
global $conf,$langs,$dolibarr_main_url_root,$mysoc; global $conf,$langs,$dolibarr_main_url_root,$mysoc;
@ -1667,8 +1671,6 @@ class ActionComm extends CommonObject
// TODO Scan events of type 'email' into table llx_actioncomm_reminder with status todo, send email, then set status to done // TODO Scan events of type 'email' into table llx_actioncomm_reminder with status todo, send email, then set status to done
// Delete also very old past events (we do not keep more than 1 month record in past) // Delete also very old past events (we do not keep more than 1 month record in past)
$sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm_reminder WHERE dateremind < '".$this->db->jdate($now - (3600 * 24 * 32))."'"; $sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm_reminder WHERE dateremind < '".$this->db->jdate($now - (3600 * 24 * 32))."'";
$this->db->query($sql); $this->db->query($sql);
@ -1679,4 +1681,3 @@ class ActionComm extends CommonObject
} }
} }

View File

@ -172,6 +172,7 @@ class ActionCommReminder 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, 6=Long 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, 6=Long label + Picto
* @return string Label of status * @return string Label of status
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function LibStatut($status,$mode=0) static function LibStatut($status,$mode=0)
{ {
global $langs; global $langs;
@ -226,4 +227,3 @@ class ActionCommReminder extends CommonObject
} }
} }

View File

@ -110,6 +110,7 @@ class CActionComm
* @param int $shortlabel 1=Get short label instead of long label * @param int $shortlabel 1=Get short label instead of long label
* @return mixed Array of all event types if OK, <0 if KO. Key of array is id or code depending on parameter $idorcode. * @return mixed Array of all event types if OK, <0 if KO. Key of array is id or code depending on parameter $idorcode.
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function liste_array($active='',$idorcode='id',$excludetype='',$onlyautoornot=0, $morefilter='', $shortlabel=0) function liste_array($active='',$idorcode='id',$excludetype='',$onlyautoornot=0, $morefilter='', $shortlabel=0)
{ {
global $langs,$conf; global $langs,$conf;

View File

@ -53,6 +53,7 @@ class ICal
* @param string $file File * @param string $file File
* @return string * @return string
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function read_file($file) function read_file($file)
{ {
$this->file = $file; $this->file = $file;
@ -72,6 +73,7 @@ class ICal
* *
* @return int * @return int
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_event_count() function get_event_count()
{ {
return $this->event_count; return $this->event_count;
@ -82,6 +84,7 @@ class ICal
* *
* @return int * @return int
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_todo_count() function get_todo_count()
{ {
return $this->todo_count; return $this->todo_count;
@ -203,6 +206,7 @@ class ICal
* @param string $value Value * @param string $value Value
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_to_array($type, $key, $value) function add_to_array($type, $key, $value)
{ {
@ -261,6 +265,7 @@ class ICal
* @param string $text Text * @param string $text Text
* @return array * @return array
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function retun_key_value($text) function retun_key_value($text)
{ {
/* /*
@ -284,6 +289,7 @@ class ICal
* @param string $value string * @param string $value string
* @return array * @return array
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function ical_rrule($value) function ical_rrule($value)
{ {
$result=array(); $result=array();
@ -301,6 +307,7 @@ class ICal
* @param string $ical_date String date * @param string $ical_date String date
* @return int * @return int
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function ical_date_to_unix($ical_date) function ical_date_to_unix($ical_date)
{ {
$ical_date = str_replace('T', '', $ical_date); $ical_date = str_replace('T', '', $ical_date);
@ -323,6 +330,7 @@ class ICal
* @param string $value Value * @param string $value Value
* @return array * @return array
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function ical_dt_date($key, $value) function ical_dt_date($key, $value)
{ {
$return_value=array(); $return_value=array();
@ -350,6 +358,7 @@ class ICal
* *
* @return array * @return array
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_sort_event_list() function get_sort_event_list()
{ {
$temp = $this->get_event_list(); $temp = $this->get_event_list();
@ -371,6 +380,7 @@ class ICal
* @param array $b Operand b * @param array $b Operand b
* @return integer * @return integer
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function ical_dtstart_compare($a, $b) function ical_dtstart_compare($a, $b)
{ {
return strnatcasecmp($a['DTSTART']['unixtime'], $b['DTSTART']['unixtime']); return strnatcasecmp($a['DTSTART']['unixtime'], $b['DTSTART']['unixtime']);
@ -381,6 +391,7 @@ class ICal
* *
* @return array * @return array
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_event_list() function get_event_list()
{ {
return (! empty($this->cal['VEVENT'])?$this->cal['VEVENT']:''); return (! empty($this->cal['VEVENT'])?$this->cal['VEVENT']:'');
@ -391,6 +402,7 @@ class ICal
* *
* @return array * @return array
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_freebusy_list() function get_freebusy_list()
{ {
return $this->cal['VFREEBUSY']; return $this->cal['VFREEBUSY'];
@ -401,6 +413,7 @@ class ICal
* *
* @return array * @return array
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_todo_list() function get_todo_list()
{ {
return $this->cal['VTODO']; return $this->cal['VTODO'];
@ -411,6 +424,7 @@ class ICal
* *
* @return array * @return array
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_calender_data() function get_calender_data()
{ {
return $this->cal['VCALENDAR']; return $this->cal['VCALENDAR'];
@ -421,6 +435,7 @@ class ICal
* *
* @return array * @return array
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_all_data() function get_all_data()
{ {
return $this->cal; return $this->cal;

View File

@ -239,6 +239,7 @@ class AdvanceTargetingMailing extends CommonObject
* @param int $id Id object * @param int $id Id object
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_by_mailing($id=0) function fetch_by_mailing($id=0)
{ {
global $langs; global $langs;
@ -305,6 +306,7 @@ class AdvanceTargetingMailing extends CommonObject
* @param string $type_element Type target * @param string $type_element Type target
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_by_element($id=0, $type_element='mailing') function fetch_by_element($id=0, $type_element='mailing')
{ {
global $langs; global $langs;
@ -529,6 +531,7 @@ class AdvanceTargetingMailing extends CommonObject
* @param array $arrayquery All element to Query * @param array $arrayquery All element to Query
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function query_thirdparty($arrayquery) function query_thirdparty($arrayquery)
{ {
global $langs,$conf; global $langs,$conf;
@ -621,16 +624,16 @@ class AdvanceTargetingMailing extends CommonObject
if (!empty($arrayquery['options_'.$key.'_max'])) { if (!empty($arrayquery['options_'.$key.'_max'])) {
$sqlwhere[]= " (te.".$key." >= ".$arrayquery['options_'.$key.'_max']." AND te.".$key." <= ".$arrayquery['options_'.$key.'_min'].")"; $sqlwhere[]= " (te.".$key." >= ".$arrayquery['options_'.$key.'_max']." AND te.".$key." <= ".$arrayquery['options_'.$key.'_min'].")";
} }
} else if (($extrafields->attribute_type[$key] == 'date') || } elseif (($extrafields->attribute_type[$key] == 'date') ||
($extrafields->attribute_type[$key] == 'datetime')) { ($extrafields->attribute_type[$key] == 'datetime')) {
if (!empty($arrayquery['options_'.$key.'_end_dt'])){ if (!empty($arrayquery['options_'.$key.'_end_dt'])){
$sqlwhere[]= " (te.".$key." >= '".$this->db->idate($arrayquery['options_'.$key.'_st_dt'])."' AND te.".$key." <= '".$this->db->idate($arrayquery['options_'.$key.'_end_dt'])."')"; $sqlwhere[]= " (te.".$key." >= '".$this->db->idate($arrayquery['options_'.$key.'_st_dt'])."' AND te.".$key." <= '".$this->db->idate($arrayquery['options_'.$key.'_end_dt'])."')";
} }
}else if ($extrafields->attribute_type[$key] == 'boolean') { } elseif ($extrafields->attribute_type[$key] == 'boolean') {
if ($arrayquery['options_'.$key]!=''){ if ($arrayquery['options_'.$key]!=''){
$sqlwhere[]= " (te.".$key." = ".$arrayquery['options_'.$key].")"; $sqlwhere[]= " (te.".$key." = ".$arrayquery['options_'.$key].")";
} }
}else{ } else {
if (is_array($arrayquery['options_'.$key])) { if (is_array($arrayquery['options_'.$key])) {
$sqlwhere[]= " (te.".$key." IN ('".implode("','",$arrayquery['options_'.$key])."'))"; $sqlwhere[]= " (te.".$key." IN ('".implode("','",$arrayquery['options_'.$key])."'))";
} elseif (!empty($arrayquery['options_'.$key])) { } elseif (!empty($arrayquery['options_'.$key])) {
@ -683,6 +686,7 @@ class AdvanceTargetingMailing extends CommonObject
* @param int $withThirdpartyFilter add contact with tridparty filter * @param int $withThirdpartyFilter add contact with tridparty filter
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function query_contact($arrayquery, $withThirdpartyFilter = 0) function query_contact($arrayquery, $withThirdpartyFilter = 0)
{ {
global $langs,$conf; global $langs,$conf;
@ -949,5 +953,4 @@ class AdvanceTargetingMailing extends CommonObject
return $return_sql_criteria; return $return_sql_criteria;
} }
}
}

View File

@ -460,4 +460,4 @@ class FormAdvTargetEmailing extends Form
$this->db->free ( $resql ); $this->db->free ( $resql );
return $out; return $out;
} }
} }

View File

@ -437,6 +437,7 @@ class Mailing extends CommonObject
* *
* @return int 1 if OK, 0 if error * @return int 1 if OK, 0 if error
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function delete_targets() function delete_targets()
{ {
$sql = "DELETE FROM ".MAIN_DB_PREFIX."mailing_cibles"; $sql = "DELETE FROM ".MAIN_DB_PREFIX."mailing_cibles";
@ -462,6 +463,7 @@ class Mailing extends CommonObject
* @param User $user Objet user qui valide * @param User $user Objet user qui valide
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function reset_targets_status($user) function reset_targets_status($user)
{ {
$sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles"; $sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles";
@ -534,6 +536,7 @@ class Mailing extends CommonObject
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Label * @return string Label
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode=0) function LibStatut($statut,$mode=0)
{ {
global $langs; global $langs;
@ -638,4 +641,3 @@ class Mailing extends CommonObject
} }
} }

View File

@ -234,6 +234,7 @@ class Propal extends CommonObject
* TODO Replace calls to this function by generation objet Ligne * TODO Replace calls to this function by generation objet Ligne
* inserted into table $this->products * inserted into table $this->products
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_product($idproduct, $qty, $remise_percent=0) function add_product($idproduct, $qty, $remise_percent=0)
{ {
global $conf, $mysoc; global $conf, $mysoc;
@ -288,6 +289,7 @@ class Propal extends CommonObject
* @param int $idremise Id of fixed discount * @param int $idremise Id of fixed discount
* @return int >0 if OK, <0 if KO * @return int >0 if OK, <0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function insert_discount($idremise) function insert_discount($idremise)
{ {
global $langs; global $langs;
@ -1167,6 +1169,7 @@ class Propal extends CommonObject
* @return int Id of the new object if ok, <0 if ko * @return int Id of the new object if ok, <0 if ko
* @see create * @see create
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function create_from($user) function create_from($user)
{ {
// i love this function because $this->products is not used in create function... // i love this function because $this->products is not used in create function...
@ -1556,6 +1559,7 @@ class Propal extends CommonObject
* @param int $only_product Return only physical products * @param int $only_product Return only physical products
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_lines($only_product=0) function fetch_lines($only_product=0)
{ {
$this->lines=array(); $this->lines=array();
@ -1795,6 +1799,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_date($user, $date, $notrigger=0) function set_date($user, $date, $notrigger=0)
{ {
if (empty($date)) if (empty($date))
@ -1862,6 +1867,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_echeance($user, $date_fin_validite, $notrigger=0) function set_echeance($user, $date_fin_validite, $notrigger=0)
{ {
if (! empty($user->rights->propal->creer)) if (! empty($user->rights->propal->creer))
@ -1922,6 +1928,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if ko, >0 if ok * @return int <0 if ko, >0 if ok
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_date_livraison($user, $date_livraison, $notrigger=0) function set_date_livraison($user, $date_livraison, $notrigger=0)
{ {
if (! empty($user->rights->propal->creer)) if (! empty($user->rights->propal->creer))
@ -1982,6 +1989,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_availability($user, $id, $notrigger=0) function set_availability($user, $id, $notrigger=0)
{ {
if (! empty($user->rights->propal->creer) && $this->statut >= self::STATUS_DRAFT) if (! empty($user->rights->propal->creer) && $this->statut >= self::STATUS_DRAFT)
@ -2051,6 +2059,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_demand_reason($user, $id, $notrigger=0) function set_demand_reason($user, $id, $notrigger=0)
{ {
if (! empty($user->rights->propal->creer) && $this->statut >= self::STATUS_DRAFT) if (! empty($user->rights->propal->creer) && $this->statut >= self::STATUS_DRAFT)
@ -2122,6 +2131,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if ko, >0 if ok * @return int <0 if ko, >0 if ok
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_ref_client($user, $ref_client, $notrigger=0) function set_ref_client($user, $ref_client, $notrigger=0)
{ {
if (! empty($user->rights->propal->creer)) if (! empty($user->rights->propal->creer))
@ -2185,6 +2195,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if ko, >0 if ok * @return int <0 if ko, >0 if ok
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_remise_percent($user, $remise, $notrigger=0) function set_remise_percent($user, $remise, $notrigger=0)
{ {
$remise=trim($remise)?trim($remise):0; $remise=trim($remise)?trim($remise):0;
@ -2250,6 +2261,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if ko, >0 if ok * @return int <0 if ko, >0 if ok
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_remise_absolue($user, $remise, $notrigger=0) function set_remise_absolue($user, $remise, $notrigger=0)
{ {
$remise=trim($remise)?trim($remise):0; $remise=trim($remise)?trim($remise):0;
@ -2533,6 +2545,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_draft($user, $notrigger=0) function set_draft($user, $notrigger=0)
{ {
$error=0; $error=0;
@ -2596,6 +2609,7 @@ class Propal extends CommonObject
* @param string $sortorder Sort order * @param string $sortorder Sort order
* @return int -1 if KO, array with result if OK * @return int -1 if KO, array with result if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function liste_array($shortlist=0, $draft=0, $notcurrentuser=0, $socid=0, $limit=0, $offset=0, $sortfield='p.datep', $sortorder='DESC') function liste_array($shortlist=0, $draft=0, $notcurrentuser=0, $socid=0, $limit=0, $offset=0, $sortfield='p.datep', $sortorder='DESC')
{ {
global $user; global $user;
@ -2675,6 +2689,7 @@ class Propal extends CommonObject
* @param int $id Id propal * @param int $id Id propal
* @return array Array of invoices id * @return array Array of invoices id
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function InvoiceArrayList($id) function InvoiceArrayList($id)
{ {
$ga = array(); $ga = array();
@ -2955,6 +2970,7 @@ class Propal extends CommonObject
* @return int >0 si ok, <0 si ko * @return int >0 si ok, <0 si ko
* @deprecated use set_demand_reason * @deprecated use set_demand_reason
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function demand_reason($demand_reason_id, $notrigger=0) function demand_reason($demand_reason_id, $notrigger=0)
{ {
global $user; global $user;
@ -3094,6 +3110,7 @@ class Propal 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, 6=Long 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, 6=Long label + Picto
* @return string Label * @return string Label
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode=1) function LibStatut($statut,$mode=1)
{ {
global $conf; global $conf;
@ -3139,6 +3156,7 @@ class Propal extends CommonObject
* @param int $mode "opened" for proposal to close, "signed" for proposal to invoice * @param int $mode "opened" for proposal to close, "signed" for proposal to invoice
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_board($user,$mode) function load_board($user,$mode)
{ {
global $conf, $langs; global $conf, $langs;
@ -3309,6 +3327,7 @@ class Propal extends CommonObject
* *
* @return int <0 if ko, >0 if ok * @return int <0 if ko, >0 if ok
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_state_board() function load_state_board()
{ {
global $user; global $user;
@ -4189,6 +4208,7 @@ class PropaleLigne extends CommonObjectLine
* *
* @return int <0 if ko, >0 if ok * @return int <0 if ko, >0 if ok
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_total() function update_total()
{ {
$this->db->begin(); $this->db->begin();
@ -4217,4 +4237,3 @@ class PropaleLigne extends CommonObjectLine
} }
} }

View File

@ -428,6 +428,7 @@ class Commande extends CommonOrder
* @param int $idwarehouse Warehouse ID to use for stock change (Used only if option STOCK_CALCULATE_ON_VALIDATE_ORDER is on) * @param int $idwarehouse Warehouse ID to use for stock change (Used only if option STOCK_CALCULATE_ON_VALIDATE_ORDER is on)
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_draft($user, $idwarehouse=-1) function set_draft($user, $idwarehouse=-1)
{ {
global $conf,$langs; global $conf,$langs;
@ -509,6 +510,7 @@ class Commande extends CommonOrder
* @param User $user Object user that change status * @param User $user Object user that change status
* @return int <0 if KO, 0 if nothing is done, >0 if OK * @return int <0 if KO, 0 if nothing is done, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_reopen($user) function set_reopen($user)
{ {
$error=0; $error=0;
@ -1480,6 +1482,7 @@ class Commande extends CommonOrder
* TODO Remplacer les appels a cette fonction par generation objet Ligne * TODO Remplacer les appels a cette fonction par generation objet Ligne
* insere dans tableau $this->products * insere dans tableau $this->products
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_product($idproduct, $qty, $remise_percent=0.0, $date_start='', $date_end='') function add_product($idproduct, $qty, $remise_percent=0.0, $date_start='', $date_end='')
{ {
global $conf, $mysoc; global $conf, $mysoc;
@ -1709,6 +1712,7 @@ class Commande extends CommonOrder
* @param int $idremise Id de la remise fixe * @param int $idremise Id de la remise fixe
* @return int >0 si ok, <0 si ko * @return int >0 si ok, <0 si ko
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function insert_discount($idremise) function insert_discount($idremise)
{ {
global $langs; global $langs;
@ -1786,6 +1790,7 @@ class Commande extends CommonOrder
* @param int $only_product Return only physical products * @param int $only_product Return only physical products
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_lines($only_product=0) function fetch_lines($only_product=0)
{ {
$this->lines=array(); $this->lines=array();
@ -2012,6 +2017,7 @@ class Commande extends CommonOrder
* *
* TODO deprecate, move to Shipping class * TODO deprecate, move to Shipping class
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function nb_expedition() function nb_expedition()
{ {
$sql = 'SELECT count(*)'; $sql = 'SELECT count(*)';
@ -2038,6 +2044,7 @@ class Commande extends CommonOrder
* *
* TODO FONCTION NON FINIE A FINIR * TODO FONCTION NON FINIE A FINIR
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function stock_array($filtre_statut=self::STATUS_CANCELED) function stock_array($filtre_statut=self::STATUS_CANCELED)
{ {
$this->stocks = array(); $this->stocks = array();
@ -2154,6 +2161,7 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_remise($user, $remise, $notrigger=0) function set_remise($user, $remise, $notrigger=0)
{ {
$remise=trim($remise)?trim($remise):0; $remise=trim($remise)?trim($remise):0;
@ -2220,6 +2228,7 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_remise_absolue($user, $remise, $notrigger=0) function set_remise_absolue($user, $remise, $notrigger=0)
{ {
$remise=trim($remise)?trim($remise):0; $remise=trim($remise)?trim($remise):0;
@ -2286,6 +2295,7 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_date($user, $date, $notrigger=0) function set_date($user, $date, $notrigger=0)
{ {
if ($user->rights->commande->creer) if ($user->rights->commande->creer)
@ -2348,8 +2358,9 @@ class Commande extends CommonOrder
* @param User $user Objet utilisateur qui modifie * @param User $user Objet utilisateur qui modifie
* @param int $date_livraison Date de livraison * @param int $date_livraison Date de livraison
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 si ko, >0 si ok * @return int <0 si ko, >0 si ok
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_date_livraison($user, $date_livraison, $notrigger=0) function set_date_livraison($user, $date_livraison, $notrigger=0)
{ {
if ($user->rights->commande->creer) if ($user->rights->commande->creer)
@ -2419,6 +2430,7 @@ class Commande extends CommonOrder
* @param string $sortorder Sort order * @param string $sortorder Sort order
* @return int -1 if KO, array with result if OK * @return int -1 if KO, array with result if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function liste_array($shortlist=0, $draft=0, $excluser='', $socid=0, $limit=0, $offset=0, $sortfield='c.date_commande', $sortorder='DESC') function liste_array($shortlist=0, $draft=0, $excluser='', $socid=0, $limit=0, $offset=0, $sortfield='c.date_commande', $sortorder='DESC')
{ {
global $user; global $user;
@ -2556,6 +2568,7 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int >0 if ok, <0 if ko * @return int >0 if ok, <0 if ko
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function demand_reason($demand_reason_id, $notrigger=0) function demand_reason($demand_reason_id, $notrigger=0)
{ {
global $user; global $user;
@ -2627,6 +2640,7 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_ref_client($user, $ref_client, $notrigger=0) function set_ref_client($user, $ref_client, $notrigger=0)
{ {
if ($user->rights->commande->creer) if ($user->rights->commande->creer)
@ -3237,6 +3251,7 @@ class Commande extends CommonOrder
* @param User $user Object user * @param User $user Object user
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_board($user) function load_board($user)
{ {
global $conf, $langs; global $conf, $langs;
@ -3324,6 +3339,7 @@ class Commande extends CommonOrder
* @param int $donotshowbilled Do not show billed status after order status * @param int $donotshowbilled Do not show billed status after order status
* @return string Label of status * @return string Label of status
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$billed,$mode,$donotshowbilled=0) function LibStatut($statut,$billed,$mode,$donotshowbilled=0)
{ {
global $langs, $conf; global $langs, $conf;
@ -3640,6 +3656,7 @@ class Commande extends CommonOrder
* *
* @return int <0 si ko, >0 si ok * @return int <0 si ko, >0 si ok
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_state_board() function load_state_board()
{ {
global $user; global $user;
@ -4266,6 +4283,7 @@ class OrderLine extends CommonOrderLine
* *
* @return int <0 if ko, >0 if ok * @return int <0 if ko, >0 if ok
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_total() function update_total()
{ {
$this->db->begin(); $this->db->begin();
@ -4299,4 +4317,3 @@ class OrderLine extends CommonOrderLine
} }
} }
} }

View File

@ -296,6 +296,7 @@ class Account extends CommonObject
* @param string $type Type of link ('payment', 'company', 'member', ...) * @param string $type Type of link ('payment', 'company', 'member', ...)
* @return int <0 if KO, id line if OK * @return int <0 if KO, id line if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_url_line($line_id, $url_id, $url, $label, $type) function add_url_line($line_id, $url_id, $url, $label, $type)
{ {
$sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_url ("; $sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_url (";
@ -334,6 +335,7 @@ class Account extends CommonObject
* @param string $type To search using type * @param string $type To search using type
* @return array|-1 Array of links array('url'=>, 'url_id'=>, 'label'=>, 'type'=> 'fk_bank'=> ) or -1 on error * @return array|-1 Array of links array('url'=>, 'url_id'=>, 'label'=>, 'type'=> 'fk_bank'=> ) or -1 on error
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_url($fk_bank='', $url_id='', $type='') function get_url($fk_bank='', $url_id='', $type='')
{ {
$lines = array(); $lines = array();
@ -775,11 +777,12 @@ class Account extends CommonObject
/** /**
* Update BBAN (RIB) account fields * Update BBAN (RIB) account fields
* *
* @param User $user Object user making update * @param User $user Object user making update
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_bban(User $user = null) function update_bban(User $user = null)
{ {
global $conf,$langs; global $conf,$langs;
@ -1065,6 +1068,7 @@ class Account 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, 6=Long 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, 6=Long label + picto
* @return string Label * @return string Label
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut, $mode = 0) function LibStatut($statut, $mode = 0)
{ {
global $langs; global $langs;
@ -1100,6 +1104,7 @@ class Account extends CommonObject
* *
* @return boolean vrai si peut etre supprime, faux sinon * @return boolean vrai si peut etre supprime, faux sinon
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function can_be_deleted() function can_be_deleted()
{ {
$can_be_deleted=false; $can_be_deleted=false;
@ -1170,6 +1175,7 @@ class Account extends CommonObject
* @param int $filteraccountid To get info for a particular account id * @param int $filteraccountid To get info for a particular account id
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_board(User $user, $filteraccountid = 0) function load_board(User $user, $filteraccountid = 0)
{ {
global $conf, $langs; global $conf, $langs;
@ -1223,6 +1229,7 @@ class Account extends CommonObject
* @param int $filteraccountid To get info for a particular account id * @param int $filteraccountid To get info for a particular account id
* @return int <0 if ko, >0 if ok * @return int <0 if ko, >0 if ok
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_state_board($filteraccountid = 0) function load_state_board($filteraccountid = 0)
{ {
global $user; global $user;
@ -1852,6 +1859,7 @@ class AccountLine extends CommonObject
* @param User $user User object that delete * @param User $user User object that delete
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function delete_urls(User $user = null) function delete_urls(User $user = null)
{ {
$nbko=0; $nbko=0;
@ -1917,12 +1925,13 @@ class AccountLine extends CommonObject
/** /**
* Update conciliation field * Update conciliation field
* *
* @param User $user Objet user making update * @param User $user Objet user making update
* @param int $cat Category id * @param int $cat Category id
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_conciliation(User $user, $cat) function update_conciliation(User $user, $cat)
{ {
global $conf,$langs; global $conf,$langs;
@ -1985,6 +1994,7 @@ class AccountLine extends CommonObject
* @param int $sign 1 or -1 * @param int $sign 1 or -1
* @return int >0 if OK, 0 if KO * @return int >0 if OK, 0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function datev_change($rowid,$sign=1) function datev_change($rowid,$sign=1)
{ {
$sql = "SELECT datev FROM ".MAIN_DB_PREFIX."bank WHERE rowid = ".$rowid; $sql = "SELECT datev FROM ".MAIN_DB_PREFIX."bank WHERE rowid = ".$rowid;
@ -2022,6 +2032,7 @@ class AccountLine extends CommonObject
* @param int $id Id of line to change * @param int $id Id of line to change
* @return int >0 if OK, 0 if KO * @return int >0 if OK, 0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function datev_next($id) function datev_next($id)
{ {
return $this->datev_change($id,1); return $this->datev_change($id,1);
@ -2033,6 +2044,7 @@ class AccountLine extends CommonObject
* @param int $id Id of line to change * @param int $id Id of line to change
* @return int >0 if OK, 0 if KO * @return int >0 if OK, 0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function datev_previous($id) function datev_previous($id)
{ {
return $this->datev_change($id,-1); return $this->datev_change($id,-1);
@ -2046,6 +2058,7 @@ class AccountLine extends CommonObject
* @param int $sign 1 or -1 * @param int $sign 1 or -1
* @return int >0 if OK, 0 if KO * @return int >0 if OK, 0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function dateo_change($rowid,$sign=1) function dateo_change($rowid,$sign=1)
{ {
$sql = "SELECT dateo FROM ".MAIN_DB_PREFIX."bank WHERE rowid = ".$rowid; $sql = "SELECT dateo FROM ".MAIN_DB_PREFIX."bank WHERE rowid = ".$rowid;
@ -2083,6 +2096,7 @@ class AccountLine extends CommonObject
* @param int $id Id of line to change * @param int $id Id of line to change
* @return int >0 if OK, 0 if KO * @return int >0 if OK, 0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function dateo_next($id) function dateo_next($id)
{ {
return $this->dateo_change($id,1); return $this->dateo_change($id,1);
@ -2094,6 +2108,7 @@ class AccountLine extends CommonObject
* @param int $id Id of line to change * @param int $id Id of line to change
* @return int >0 if OK, 0 if KO * @return int >0 if OK, 0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function dateo_previous($id) function dateo_previous($id)
{ {
return $this->dateo_change($id,-1); return $this->dateo_change($id,-1);
@ -2209,6 +2224,7 @@ class AccountLine extends CommonObject
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Libelle du statut * @return string Libelle du statut
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode=0) function LibStatut($statut,$mode=0)
{ {
global $langs; global $langs;
@ -2282,4 +2298,3 @@ class AccountLine extends CommonObject
} }
} }

View File

@ -440,6 +440,7 @@ class PaymentVarious extends CommonObject
* @param int $id_bank Id bank account * @param int $id_bank Id bank account
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_fk_bank($id_bank) function update_fk_bank($id_bank)
{ {
$sql = 'UPDATE '.MAIN_DB_PREFIX.'payment_various SET fk_bank = '.$id_bank; $sql = 'UPDATE '.MAIN_DB_PREFIX.'payment_various SET fk_bank = '.$id_bank;
@ -475,6 +476,7 @@ class PaymentVarious 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 Libelle * @return string Libelle
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode=0) function LibStatut($statut,$mode=0)
{ {
global $langs; global $langs;

View File

@ -300,6 +300,7 @@ class Deplacement 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 Libelle * @return string Libelle
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode=0) function LibStatut($statut,$mode=0)
{ {
global $langs; global $langs;
@ -447,4 +448,3 @@ class Deplacement extends CommonObject
} }
} }

View File

@ -435,8 +435,9 @@ class FactureRec extends CommonInvoice
/** /**
* Recupere les lignes de factures predefinies dans this->lines * Recupere les lignes de factures predefinies dans this->lines
* *
* @return int 1 if OK, < 0 if KO * @return int 1 if OK, < 0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_lines() function fetch_lines()
{ {
$this->lines=array(); $this->lines=array();
@ -1183,6 +1184,7 @@ class FactureRec extends CommonInvoice
* @param int $type Type invoice * @param int $type Type invoice
* @return string Label of status * @return string Label of status
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($recur, $status, $mode=0, $alreadypaid=-1, $type=0) function LibStatut($recur, $status, $mode=0, $alreadypaid=-1, $type=0)
{ {
global $langs; global $langs;

View File

@ -1403,6 +1403,7 @@ class Facture extends CommonInvoice
* *
* @return int 1 if OK, < 0 if KO * @return int 1 if OK, < 0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_lines() function fetch_lines()
{ {
$this->lines=array(); $this->lines=array();
@ -1664,6 +1665,7 @@ class Facture extends CommonInvoice
* @param int $idremise Id of absolute discount * @param int $idremise Id of absolute discount
* @return int >0 if OK, <0 if KO * @return int >0 if OK, <0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function insert_discount($idremise) function insert_discount($idremise)
{ {
global $langs; global $langs;
@ -1765,6 +1767,7 @@ class Facture extends CommonInvoice
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_ref_client($ref_client, $notrigger=0) function set_ref_client($ref_client, $notrigger=0)
{ {
global $user; global $user;
@ -2000,6 +2003,7 @@ class Facture extends CommonInvoice
* @param string $close_note Commentaire renseigne si on classe a payee alors que paiement incomplet (cas escompte par exemple) * @param string $close_note Commentaire renseigne si on classe a payee alors que paiement incomplet (cas escompte par exemple)
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_paid($user, $close_code='', $close_note='') function set_paid($user, $close_code='', $close_note='')
{ {
$error=0; $error=0;
@ -2057,6 +2061,7 @@ class Facture extends CommonInvoice
* @param User $user Object user that change status * @param User $user Object user that change status
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_unpaid($user) function set_unpaid($user)
{ {
$error=0; $error=0;
@ -2106,6 +2111,7 @@ class Facture extends CommonInvoice
* @param string $close_note Comment * @param string $close_note Comment
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_canceled($user, $close_code='', $close_note='') function set_canceled($user, $close_code='', $close_note='')
{ {
@ -2466,6 +2472,7 @@ class Facture extends CommonInvoice
* @param int $idwarehouse Id warehouse to use for stock change. * @param int $idwarehouse Id warehouse to use for stock change.
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_draft($user,$idwarehouse=-1) function set_draft($user,$idwarehouse=-1)
{ {
global $conf,$langs; global $conf,$langs;
@ -3031,6 +3038,7 @@ class Facture extends CommonInvoice
* @param int $percent Percentage * @param int $percent Percentage
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_percent($line, $percent) function update_percent($line, $percent)
{ {
global $mysoc,$user; global $mysoc,$user;
@ -3128,6 +3136,7 @@ class Facture extends CommonInvoice
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if ko, >0 if ok * @return int <0 if ko, >0 if ok
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_remise($user, $remise, $notrigger=0) function set_remise($user, $remise, $notrigger=0)
{ {
// Clean parameters // Clean parameters
@ -3192,6 +3201,7 @@ class Facture extends CommonInvoice
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_remise_absolue($user, $remise, $notrigger=0) function set_remise_absolue($user, $remise, $notrigger=0)
{ {
if (empty($remise)) $remise=0; if (empty($remise)) $remise=0;
@ -3397,6 +3407,7 @@ class Facture extends CommonInvoice
* @param string $sortorder Sort order * @param string $sortorder Sort order
* @return int -1 if KO, array with result if OK * @return int -1 if KO, array with result if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function liste_array($shortlist=0, $draft=0, $excluser='', $socid=0, $limit=0, $offset=0, $sortfield='f.datef,f.rowid', $sortorder='DESC') function liste_array($shortlist=0, $draft=0, $excluser='', $socid=0, $limit=0, $offset=0, $sortfield='f.datef,f.rowid', $sortorder='DESC')
{ {
global $conf,$user; global $conf,$user;
@ -3466,6 +3477,7 @@ class Facture extends CommonInvoice
* @param int $socid Id thirdparty * @param int $socid Id thirdparty
* @return array Array of invoices ('id'=>id, 'ref'=>ref, 'status'=>status, 'paymentornot'=>0/1) * @return array Array of invoices ('id'=>id, 'ref'=>ref, 'status'=>status, 'paymentornot'=>0/1)
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function list_replacable_invoices($socid=0) function list_replacable_invoices($socid=0)
{ {
global $conf; global $conf;
@ -3514,6 +3526,7 @@ class Facture extends CommonInvoice
* @param int $socid Id thirdparty * @param int $socid Id thirdparty
* @return array Array of invoices ($id => array('ref'=>,'paymentornot'=>,'status'=>,'paye'=>) * @return array Array of invoices ($id => array('ref'=>,'paymentornot'=>,'status'=>,'paye'=>)
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function list_qualified_avoir_invoices($socid=0) function list_qualified_avoir_invoices($socid=0)
{ {
global $conf; global $conf;
@ -3587,6 +3600,7 @@ class Facture extends CommonInvoice
* @param float $amount Amount we request direct debit for * @param float $amount Amount we request direct debit for
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function demande_prelevement($fuser, $amount=0) function demande_prelevement($fuser, $amount=0)
{ {
@ -3696,6 +3710,7 @@ class Facture extends CommonInvoice
* @param int $did id de la demande a supprimer * @param int $did id de la demande a supprimer
* @return int <0 if OK, >0 if KO * @return int <0 if OK, >0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function demande_prelevement_delete($fuser, $did) function demande_prelevement_delete($fuser, $did)
{ {
$sql = 'DELETE FROM '.MAIN_DB_PREFIX.'prelevement_facture_demande'; $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'prelevement_facture_demande';
@ -3720,6 +3735,7 @@ class Facture extends CommonInvoice
* @param User $user Object user * @param User $user Object user
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_board($user) function load_board($user)
{ {
global $conf, $langs; global $conf, $langs;
@ -3963,6 +3979,7 @@ class Facture extends CommonInvoice
* *
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_state_board() function load_state_board()
{ {
global $conf, $user; global $conf, $user;
@ -4076,6 +4093,7 @@ class Facture extends CommonInvoice
* *
* @return boolean * @return boolean
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function is_first() function is_first()
{ {
return ($this->situation_counter == 1); return ($this->situation_counter == 1);
@ -4086,6 +4104,7 @@ class Facture extends CommonInvoice
* *
* @return mixed -1 if error, array of previous situations * @return mixed -1 if error, array of previous situations
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_prev_sits() function get_prev_sits()
{ {
global $conf; global $conf;
@ -4166,6 +4185,7 @@ class Facture extends CommonInvoice
* @return bool Last of the cycle status * @return bool Last of the cycle status
* *
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function is_last_in_cycle() function is_last_in_cycle()
{ {
global $conf; global $conf;
@ -4796,6 +4816,7 @@ class FactureLigne extends CommonInvoiceLine
* *
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_total() function update_total()
{ {
$this->db->begin(); $this->db->begin();
@ -4837,6 +4858,7 @@ class FactureLigne extends CommonInvoiceLine
* @param int $invoiceid Invoice id * @param int $invoiceid Invoice id
* @return int >= 0 * @return int >= 0
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_prev_progress($invoiceid) function get_prev_progress($invoiceid)
{ {
if (is_null($this->fk_prev_id) || empty($this->fk_prev_id) || $this->fk_prev_id == "") { if (is_null($this->fk_prev_id) || empty($this->fk_prev_id) || $this->fk_prev_id == "") {

View File

@ -337,6 +337,7 @@ class Localtax extends CommonObject
* @param int $year Year * @param int $year Year
* @return int ??? * @return int ???
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function localtax_sum_collectee($year = 0) function localtax_sum_collectee($year = 0)
{ {
$sql = "SELECT sum(f.localtax) as amount"; $sql = "SELECT sum(f.localtax) as amount";
@ -375,6 +376,7 @@ class Localtax extends CommonObject
* @param int $year Year * @param int $year Year
* @return int ??? * @return int ???
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function localtax_sum_payee($year = 0) function localtax_sum_payee($year = 0)
{ {
@ -416,6 +418,7 @@ class Localtax extends CommonObject
* @param int $year Year * @param int $year Year
* @return int ??? * @return int ???
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function localtax_sum_reglee($year = 0) function localtax_sum_reglee($year = 0)
{ {
@ -569,6 +572,7 @@ class Localtax extends CommonObject
* @param int $id Id bank account * @param int $id Id bank account
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_fk_bank($id) function update_fk_bank($id)
{ {
$sql = 'UPDATE '.MAIN_DB_PREFIX.'localtax SET fk_bank = '.$id; $sql = 'UPDATE '.MAIN_DB_PREFIX.'localtax SET fk_bank = '.$id;
@ -629,11 +633,12 @@ class Localtax extends CommonObject
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Libelle du statut * @return string Libelle du statut
*/ */
function LibStatut($status,$mode=0) // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
{ function LibStatut($status,$mode=0)
global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage {
global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage
return ''; return '';
} }
} }

View File

@ -486,6 +486,7 @@ class RemiseCheque extends CommonObject
* @param User $user Objet user * @param User $user Objet user
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_board($user) function load_board($user)
{ {
global $conf, $langs; global $conf, $langs;
@ -538,6 +539,7 @@ class RemiseCheque extends CommonObject
* *
* @return int <0 if ko, >0 if ok * @return int <0 if ko, >0 if ok
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_state_board() function load_state_board()
{ {
global $user; global $user;
@ -850,8 +852,9 @@ class RemiseCheque extends CommonObject
/** /**
* Charge les proprietes ref_previous et ref_next * Charge les proprietes ref_previous et ref_next
* *
* @return int <0 if KO, 0 if OK * @return int <0 if KO, 0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_previous_next_id() function load_previous_next_id()
{ {
global $conf; global $conf;
@ -895,6 +898,7 @@ class RemiseCheque extends CommonObject
* @param int $date Date creation * @param int $date Date creation
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_date($user, $date) function set_date($user, $date)
{ {
if ($user->rights->banque->cheque) if ($user->rights->banque->cheque)
@ -929,6 +933,7 @@ class RemiseCheque extends CommonObject
* @param int $ref ref of bordereau * @param int $ref ref of bordereau
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_number($user, $ref) function set_number($user, $ref)
{ {
if ($user->rights->banque->cheque) if ($user->rights->banque->cheque)
@ -1051,6 +1056,7 @@ class RemiseCheque 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, 6=Long 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, 6=Long label + picto
* @return string Libelle du statut * @return string Libelle du statut
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($status,$mode=0) function LibStatut($status,$mode=0)
{ {
global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage

View File

@ -700,6 +700,7 @@ class Paiement extends CommonObject
* @param int $id_bank Id compte bancaire * @param int $id_bank Id compte bancaire
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_fk_bank($id_bank) function update_fk_bank($id_bank)
{ {
$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' set fk_bank = '.$id_bank; $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' set fk_bank = '.$id_bank;
@ -725,6 +726,7 @@ class Paiement extends CommonObject
* @param int $date New date * @param int $date New date
* @return int <0 if KO, 0 if OK * @return int <0 if KO, 0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_date($date) function update_date($date)
{ {
if (!empty($date) && $this->statut!=1) if (!empty($date) && $this->statut!=1)
@ -756,6 +758,7 @@ class Paiement extends CommonObject
* @param string $num New num * @param string $num New num
* @return int <0 if KO, 0 if OK * @return int <0 if KO, 0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_num($num) function update_num($num)
{ {
if(!empty($num) && $this->statut!=1) if(!empty($num) && $this->statut!=1)
@ -1119,6 +1122,7 @@ class Paiement extends CommonObject
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Libelle du statut * @return string Libelle du statut
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($status,$mode=0) function LibStatut($status,$mode=0)
{ {
global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage
@ -1163,11 +1167,12 @@ class Paiement extends CommonObject
} }
/** /**
* Load the third party of object, from id into this->thirdparty * Load the third party of object, from id into this->thirdparty
* *
* @param int $force_thirdparty_id Force thirdparty id * @param int $force_thirdparty_id Force thirdparty id
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_thirdparty($force_thirdparty_id=0) function fetch_thirdparty($force_thirdparty_id=0)
{ {
include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';

View File

@ -114,6 +114,7 @@ class BonPrelevement extends CommonObject
* @param string $number_key number key of account number * @param string $number_key number key of account number
* @return int >0 if OK, <0 if KO * @return int >0 if OK, <0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function AddFacture($facture_id, $client_id, $client_nom, $amount, $code_banque, $code_guichet, $number, $number_key) function AddFacture($facture_id, $client_id, $client_nom, $amount, $code_banque, $code_guichet, $number, $number_key)
{ {
$result = 0; $result = 0;
@ -325,6 +326,7 @@ class BonPrelevement extends CommonObject
* *
* @return int <0 if KO, >=0 if OK * @return int <0 if KO, >=0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_credite() function set_credite()
{ {
global $user,$conf; global $user,$conf;
@ -404,6 +406,7 @@ class BonPrelevement extends CommonObject
* @param int $date date of action * @param int $date date of action
* @return int >0 if OK, <0 if KO * @return int >0 if OK, <0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_infocredit($user, $date) function set_infocredit($user, $date)
{ {
global $conf,$langs; global $conf,$langs;
@ -551,6 +554,7 @@ class BonPrelevement extends CommonObject
* @param string $method method of transmision to bank * @param string $method method of transmision to bank
* @return int >0 if OK, <0 if KO * @return int >0 if OK, <0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_infotrans($user, $date, $method) function set_infotrans($user, $date, $method)
{ {
global $conf,$langs; global $conf,$langs;
@ -672,6 +676,7 @@ class BonPrelevement extends CommonObject
* *
* @return double Total amount * @return double Total amount
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SommeAPrelever() function SommeAPrelever()
{ {
global $conf; global $conf;
@ -712,6 +717,7 @@ class BonPrelevement extends CommonObject
* @param int $agence dolibarr mysoc agence * @param int $agence dolibarr mysoc agence
* @return int <O if KO, number of invoices if OK * @return int <O if KO, number of invoices if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function NbFactureAPrelever($banque=0,$agence=0) function NbFactureAPrelever($banque=0,$agence=0)
{ {
global $conf; global $conf;
@ -756,6 +762,7 @@ class BonPrelevement extends CommonObject
* @param string $executiondate Date to execute the transfer * @param string $executiondate Date to execute the transfer
* @return int <0 if KO, nbre of invoice withdrawed if OK * @return int <0 if KO, nbre of invoice withdrawed if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function Create($banque=0, $agence=0, $mode='real', $format='ALL',$executiondate='') function Create($banque=0, $agence=0, $mode='real', $format='ALL',$executiondate='')
{ {
global $conf,$langs; global $conf,$langs;
@ -1186,6 +1193,7 @@ class BonPrelevement extends CommonObject
* @param int $rowid id of notification * @param int $rowid id of notification
* @return int 0 if OK, <0 if KO * @return int 0 if OK, <0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DeleteNotificationById($rowid) function DeleteNotificationById($rowid)
{ {
$result = 0; $result = 0;
@ -1210,6 +1218,7 @@ class BonPrelevement extends CommonObject
* @param string $action notification action * @param string $action notification action
* @return int >0 if OK, <0 if KO * @return int >0 if OK, <0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DeleteNotification($user, $action) function DeleteNotification($user, $action)
{ {
$result = 0; $result = 0;
@ -1235,6 +1244,7 @@ class BonPrelevement extends CommonObject
* @param string $action notification action * @param string $action notification action
* @return int 0 if OK, <0 if KO * @return int 0 if OK, <0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function AddNotification($db, $user, $action) function AddNotification($db, $user, $action)
{ {
$result = 0; $result = 0;
@ -1467,6 +1477,7 @@ class BonPrelevement extends CommonObject
* @param string $rib_dom rib domiciliation * @param string $rib_dom rib domiciliation
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function EnregDestinataire($rowid, $client_nom, $rib_banque, $rib_guichet, $rib_number, $amount, $facnumber, $facid, $rib_dom='') function EnregDestinataire($rowid, $client_nom, $rib_banque, $rib_guichet, $rib_number, $amount, $facnumber, $facid, $rib_dom='')
{ {
fputs($this->file, "06"); fputs($this->file, "06");
@ -1560,6 +1571,7 @@ class BonPrelevement extends CommonObject
* @param string $row_drum rib.rowid used to generate rum * @param string $row_drum rib.rowid used to generate rum
* @return string Return string with SEPA part DrctDbtTxInf * @return string Return string with SEPA part DrctDbtTxInf
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function EnregDestinataireSEPA($row_code_client, $row_nom, $row_address, $row_zip, $row_town, $row_country_code, $row_cb, $row_cg, $row_cc, $row_somme, $row_facnumber, $row_idfac, $row_iban, $row_bic, $row_datec, $row_drum) function EnregDestinataireSEPA($row_code_client, $row_nom, $row_address, $row_zip, $row_town, $row_country_code, $row_cb, $row_cg, $row_cc, $row_somme, $row_facnumber, $row_idfac, $row_iban, $row_bic, $row_datec, $row_drum)
{ {
$CrLf = "\n"; $CrLf = "\n";
@ -1621,6 +1633,7 @@ class BonPrelevement extends CommonObject
* *
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function EnregEmetteur() function EnregEmetteur()
{ {
fputs($this->file, "03"); fputs($this->file, "03");
@ -1694,6 +1707,7 @@ class BonPrelevement extends CommonObject
* @param string $format FRST or RCUR or ALL * @param string $format FRST or RCUR or ALL
* @return string String with SEPA Sender * @return string String with SEPA Sender
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function EnregEmetteurSEPA($configuration, $ladate, $nombre, $total, $CrLf='\n', $format='FRST') function EnregEmetteurSEPA($configuration, $ladate, $nombre, $total, $CrLf='\n', $format='FRST')
{ {
// SEPA INITIALISATION // SEPA INITIALISATION
@ -1809,6 +1823,7 @@ class BonPrelevement extends CommonObject
* @param int $total total amount * @param int $total total amount
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function EnregTotal($total) function EnregTotal($total)
{ {
fputs($this->file, "08"); fputs($this->file, "08");
@ -1882,6 +1897,7 @@ class BonPrelevement 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, 6=Long 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, 6=Long label + Picto
* @return string Label * @return string Label
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode=0) function LibStatut($statut,$mode=0)
{ {
if (empty($this->labelstatut)) if (empty($this->labelstatut))
@ -1934,4 +1950,3 @@ class BonPrelevement extends CommonObject
} }
} }

View File

@ -128,6 +128,7 @@ class LignePrelevement
* @param int $mode 0=Label, 1=Picto + label, 2=Picto, 3=Label + Picto * @param int $mode 0=Label, 1=Picto + label, 2=Picto, 3=Label + Picto
* @return string Label * @return string Label
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode=0) function LibStatut($statut,$mode=0)
{ {
global $langs; global $langs;
@ -173,4 +174,3 @@ class LignePrelevement
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables); return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
} }
} }

View File

@ -200,6 +200,7 @@ class RejetPrelevement
* @param Facture $fac Invoice object * @param Facture $fac Invoice object
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _send_email($fac) function _send_email($fac)
{ {
global $langs; global $langs;
@ -366,4 +367,3 @@ class RejetPrelevement
} }
} }

View File

@ -479,6 +479,7 @@ class PaymentSalary extends CommonObject
* @param int $id_bank Id bank account * @param int $id_bank Id bank account
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_fk_bank($id_bank) function update_fk_bank($id_bank)
{ {
$sql = 'UPDATE '.MAIN_DB_PREFIX.'payment_salary SET fk_bank = '.$id_bank; $sql = 'UPDATE '.MAIN_DB_PREFIX.'payment_salary SET fk_bank = '.$id_bank;
@ -577,6 +578,7 @@ class PaymentSalary extends CommonObject
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Libelle du statut * @return string Libelle du statut
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($status,$mode=0) function LibStatut($status,$mode=0)
{ {
global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage

View File

@ -45,7 +45,7 @@ class Cchargesociales
/** /**
*/ */
public $libelle; public $libelle;
public $deductible; public $deductible;
public $active; public $active;
@ -56,7 +56,7 @@ class Cchargesociales
/** /**
*/ */
/** /**
* Constructor * Constructor
@ -83,7 +83,7 @@ class Cchargesociales
$error = 0; $error = 0;
// Clean parameters // Clean parameters
if (isset($this->libelle)) { if (isset($this->libelle)) {
$this->libelle = trim($this->libelle); $this->libelle = trim($this->libelle);
} }
@ -106,14 +106,14 @@ class Cchargesociales
$this->accountancy_code = trim($this->accountancy_code); $this->accountancy_code = trim($this->accountancy_code);
} }
// Check parameters // Check parameters
// Put here code to add control on parameters values // Put here code to add control on parameters values
// Insert request // Insert request
$sql = 'INSERT INTO ' . MAIN_DB_PREFIX . $this->table_element . '('; $sql = 'INSERT INTO ' . MAIN_DB_PREFIX . $this->table_element . '(';
$sql.= 'libelle,'; $sql.= 'libelle,';
$sql.= 'deductible,'; $sql.= 'deductible,';
$sql.= 'active,'; $sql.= 'active,';
@ -122,9 +122,9 @@ class Cchargesociales
$sql.= 'module'; $sql.= 'module';
$sql.= 'accountancy_code'; $sql.= 'accountancy_code';
$sql .= ') VALUES ('; $sql .= ') VALUES (';
$sql .= ' '.(! isset($this->libelle)?'NULL':"'".$this->db->escape($this->libelle)."'").','; $sql .= ' '.(! isset($this->libelle)?'NULL':"'".$this->db->escape($this->libelle)."'").',';
$sql .= ' '.(! isset($this->deductible)?'NULL':$this->deductible).','; $sql .= ' '.(! isset($this->deductible)?'NULL':$this->deductible).',';
$sql .= ' '.(! isset($this->active)?'NULL':$this->active).','; $sql .= ' '.(! isset($this->active)?'NULL':$this->active).',';
@ -133,7 +133,7 @@ class Cchargesociales
$sql .= ' '.(! isset($this->module)?'NULL':"'".$this->db->escape($this->module)."'").','; $sql .= ' '.(! isset($this->module)?'NULL':"'".$this->db->escape($this->module)."'").',';
$sql .= ' '.(! isset($this->accountancy_code)?'NULL':"'".$this->db->escape($this->accountancy_code)."'"); $sql .= ' '.(! isset($this->accountancy_code)?'NULL':"'".$this->db->escape($this->accountancy_code)."'");
$sql .= ')'; $sql .= ')';
$this->db->begin(); $this->db->begin();
@ -206,7 +206,7 @@ class Cchargesociales
$obj = $this->db->fetch_object($resql); $obj = $this->db->fetch_object($resql);
$this->id = $obj->id; $this->id = $obj->id;
$this->libelle = $obj->libelle; $this->libelle = $obj->libelle;
$this->deductible = $obj->deductible; $this->deductible = $obj->deductible;
$this->active = $obj->active; $this->active = $obj->active;
@ -215,7 +215,7 @@ class Cchargesociales
$this->module = $obj->module; $this->module = $obj->module;
$this->accountancy_code = $obj->accountancy_code; $this->accountancy_code = $obj->accountancy_code;
} }
$this->db->free($resql); $this->db->free($resql);
@ -247,7 +247,7 @@ class Cchargesociales
dol_syslog(__METHOD__, LOG_DEBUG); dol_syslog(__METHOD__, LOG_DEBUG);
// Clean parameters // Clean parameters
if (isset($this->libelle)) { if (isset($this->libelle)) {
$this->libelle = trim($this->libelle); $this->libelle = trim($this->libelle);
} }
@ -270,7 +270,7 @@ class Cchargesociales
$this->accountancy_code = trim($this->accountancy_code); $this->accountancy_code = trim($this->accountancy_code);
} }
// Check parameters // Check parameters
// Put here code to add a control on parameters values // Put here code to add a control on parameters values
@ -454,7 +454,7 @@ class Cchargesociales
$result.= $link . $this->ref . $linkend; $result.= $link . $this->ref . $linkend;
return $result; return $result;
} }
/** /**
* Retourne le libelle du status d'un user (actif, inactif) * Retourne le libelle du status d'un user (actif, inactif)
* *
@ -473,6 +473,7 @@ class Cchargesociales
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Label of status * @return string Label of status
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($status,$mode=0) function LibStatut($status,$mode=0)
{ {
global $langs; global $langs;
@ -509,8 +510,8 @@ class Cchargesociales
if ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut5'); if ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut5');
} }
} }
/** /**
* Initialise object with example values * Initialise object with example values
* Id must be 0 if object instance is a specimen * Id must be 0 if object instance is a specimen
@ -520,7 +521,7 @@ class Cchargesociales
public function initAsSpecimen() public function initAsSpecimen()
{ {
$this->id = 0; $this->id = 0;
$this->libelle = ''; $this->libelle = '';
$this->deductible = ''; $this->deductible = '';
$this->active = ''; $this->active = '';
@ -529,7 +530,7 @@ class Cchargesociales
$this->module = ''; $this->module = '';
$this->accountancy_code = ''; $this->accountancy_code = '';
} }
} }

View File

@ -365,6 +365,7 @@ class ChargeSociales extends CommonObject
* @param User $user Object user making change * @param User $user Object user making change
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_paid($user) function set_paid($user)
{ {
$sql = "UPDATE ".MAIN_DB_PREFIX."chargesociales SET"; $sql = "UPDATE ".MAIN_DB_PREFIX."chargesociales SET";
@ -380,6 +381,7 @@ class ChargeSociales extends CommonObject
* @param User $user Object user making change * @param User $user Object user making change
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_unpaid($user) function set_unpaid($user)
{ {
$sql = "UPDATE ".MAIN_DB_PREFIX."chargesociales SET"; $sql = "UPDATE ".MAIN_DB_PREFIX."chargesociales SET";
@ -410,6 +412,7 @@ class ChargeSociales extends CommonObject
* @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise) * @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise)
* @return string Label * @return string Label
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode=0,$alreadypaid=-1) function LibStatut($statut,$mode=0,$alreadypaid=-1)
{ {
global $langs; global $langs;
@ -637,4 +640,3 @@ class ChargeSociales extends CommonObject
$this->type_libelle = 'Social contribution label'; $this->type_libelle = 'Social contribution label';
} }
} }

View File

@ -600,6 +600,7 @@ class PaymentSocialContribution extends CommonObject
* @param int $id_bank Id if bank * @param int $id_bank Id if bank
* @return int >0 if OK, <=0 if KO * @return int >0 if OK, <=0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_fk_bank($id_bank) function update_fk_bank($id_bank)
{ {
$sql = "UPDATE ".MAIN_DB_PREFIX."paiementcharge SET fk_bank = ".$id_bank." WHERE rowid = ".$this->id; $sql = "UPDATE ".MAIN_DB_PREFIX."paiementcharge SET fk_bank = ".$id_bank." WHERE rowid = ".$this->id;
@ -636,6 +637,7 @@ class PaymentSocialContribution extends CommonObject
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Libelle du statut * @return string Libelle du statut
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($status,$mode=0) function LibStatut($status,$mode=0)
{ {
global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage
@ -708,5 +710,3 @@ class PaymentSocialContribution extends CommonObject
return $result; return $result;
} }
} }

View File

@ -354,8 +354,9 @@ class Tva extends CommonObject
* Total of the VAT from invoices emitted by the thirdparty. * Total of the VAT from invoices emitted by the thirdparty.
* *
* @param int $year Year * @param int $year Year
* @return double Amount * @return double Amount
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function tva_sum_collectee($year = 0) function tva_sum_collectee($year = 0)
{ {
@ -395,6 +396,7 @@ class Tva extends CommonObject
* @param int $year Year * @param int $year Year
* @return double Amount * @return double Amount
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function tva_sum_payee($year = 0) function tva_sum_payee($year = 0)
{ {
@ -435,6 +437,7 @@ class Tva extends CommonObject
* @param int $year Year * @param int $year Year
* @return double Amount * @return double Amount
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function tva_sum_reglee($year = 0) function tva_sum_reglee($year = 0)
{ {
@ -626,6 +629,7 @@ class Tva extends CommonObject
* @param int $id_bank Id bank account * @param int $id_bank Id bank account
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_fk_bank($id_bank) function update_fk_bank($id_bank)
{ {
$sql = 'UPDATE '.MAIN_DB_PREFIX.'tva SET fk_bank = '.$id_bank; $sql = 'UPDATE '.MAIN_DB_PREFIX.'tva SET fk_bank = '.$id_bank;
@ -790,10 +794,11 @@ class Tva extends CommonObject
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Libelle du statut * @return string Libelle du statut
*/ */
function LibStatut($status,$mode=0) // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
{ function LibStatut($status,$mode=0)
global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage {
global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage
return ''; return '';
} }
} }

View File

@ -72,6 +72,7 @@ abstract class ActionsContactCardCommon
* @param int $id Id * @param int $id Id
* @return string HTML output * @return string HTML output
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function assign_values(&$action, $id) function assign_values(&$action, $id)
{ {
global $conf, $langs, $user, $canvas; global $conf, $langs, $user, $canvas;
@ -307,4 +308,3 @@ abstract class ActionsContactCardCommon
} }
} }

View File

@ -73,6 +73,7 @@ class ActionsContactCardDefault extends ActionsContactCardCommon
* @param int $id Id * @param int $id Id
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function assign_values(&$action, $id) function assign_values(&$action, $id)
{ {
global $limit, $offset, $sortfield, $sortorder; global $limit, $offset, $sortfield, $sortorder;
@ -129,6 +130,7 @@ class ActionsContactCardDefault extends ActionsContactCardCommon
* @param string $sortorder Sort order ('ASC' or 'DESC') * @param string $sortorder Sort order ('ASC' or 'DESC')
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LoadListDatas($limit, $offset, $sortfield, $sortorder) function LoadListDatas($limit, $offset, $sortfield, $sortorder)
{ {
global $conf, $langs; global $conf, $langs;
@ -138,4 +140,3 @@ class ActionsContactCardDefault extends ActionsContactCardCommon
$this->list_datas = array(); $this->list_datas = array();
} }
} }

View File

@ -142,6 +142,7 @@ class Contact extends CommonObject
* *
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_state_board() function load_state_board()
{ {
global $user; global $user;
@ -475,6 +476,7 @@ class Contact extends CommonObject
* 2=Return key only (uid=qqq) * 2=Return key only (uid=qqq)
* @return string DN * @return string DN
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _load_ldap_dn($info,$mode=0) function _load_ldap_dn($info,$mode=0)
{ {
global $conf; global $conf;
@ -491,6 +493,7 @@ class Contact extends CommonObject
* *
* @return array Tableau info des attributs * @return array Tableau info des attributs
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _load_ldap_info() function _load_ldap_info()
{ {
global $conf,$langs; global $conf,$langs;
@ -567,6 +570,7 @@ class Contact extends CommonObject
* @param int $notrigger 0=no, 1=yes * @param int $notrigger 0=no, 1=yes
* @return int <0 if KO, >=0 if OK * @return int <0 if KO, >=0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_perso($id, $user=null, $notrigger=0) function update_perso($id, $user=null, $notrigger=0)
{ {
$error=0; $error=0;
@ -845,6 +849,7 @@ class Contact extends CommonObject
* *
* @return int <0 if KO, >=0 if OK * @return int <0 if KO, >=0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_ref_elements() function load_ref_elements()
{ {
// Compte les elements pour lesquels il est contact // Compte les elements pour lesquels il est contact
@ -1184,6 +1189,7 @@ class Contact extends CommonObject
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Libelle * @return string Libelle
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode) function LibStatut($statut,$mode)
{ {
global $langs; global $langs;
@ -1228,6 +1234,7 @@ class Contact extends CommonObject
* @param int $statut Type (0 = public, 1 = private) * @param int $statut Type (0 = public, 1 = private)
* @return string Label translated * @return string Label translated
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibPubPriv($statut) function LibPubPriv($statut)
{ {
global $langs; global $langs;

View File

@ -236,6 +236,7 @@ class Contrat extends CommonObject
* @param string $comment A comment typed by user * @param string $comment A comment typed by user
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function active_line($user, $line_id, $date, $date_end='', $comment='') function active_line($user, $line_id, $date, $date_end='', $comment='')
{ {
$result = $this->lines[$this->lines_id_index_mapper[$line_id]]->active_line($user, $date, $date_end, $comment); $result = $this->lines[$this->lines_id_index_mapper[$line_id]]->active_line($user, $date, $date_end, $comment);
@ -257,6 +258,7 @@ class Contrat extends CommonObject
* @param string $comment A comment typed by user * @param string $comment A comment typed by user
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function close_line($user, $line_id, $date_end, $comment='') function close_line($user, $line_id, $date_end, $comment='')
{ {
$result=$this->lines[$this->lines_id_index_mapper[$line_id]]->close_line($user, $date_end, $comment); $result=$this->lines[$this->lines_id_index_mapper[$line_id]]->close_line($user, $date_end, $comment);
@ -698,6 +700,7 @@ class Contrat extends CommonObject
* *
* @return ContratLigne[] Return array of contract lines * @return ContratLigne[] Return array of contract lines
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_lines() function fetch_lines()
{ {
$this->nbofserviceswait=0; $this->nbofserviceswait=0;
@ -1776,6 +1779,7 @@ class Contrat extends CommonObject
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
* @deprecated This function will never be used. Status of a contract is status of its lines. * @deprecated This function will never be used. Status of a contract is status of its lines.
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_statut($user) function update_statut($user)
{ {
dol_syslog(__METHOD__ . " is deprecated", LOG_WARNING); dol_syslog(__METHOD__ . " is deprecated", LOG_WARNING);
@ -1814,6 +1818,7 @@ class Contrat extends CommonObject
* @param int $mode 0=Long label, 1=Short label, 2=Picto + Libelle court, 3=Picto, 4=Picto + Long label of all services, 5=Libelle court + Picto, 6=Picto of all services, 7=Same than 6 with fixed length * @param int $mode 0=Long label, 1=Short label, 2=Picto + Libelle court, 3=Picto, 4=Picto + Long label of all services, 5=Libelle court + Picto, 6=Picto of all services, 7=Same than 6 with fixed length
* @return string Label * @return string Label
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode) function LibStatut($statut,$mode)
{ {
global $langs; global $langs;
@ -1995,6 +2000,7 @@ class Contrat extends CommonObject
* @param int $statut Status of lines to get * @param int $statut Status of lines to get
* @return array Array of line's rowid * @return array Array of line's rowid
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function array_detail($statut=-1) function array_detail($statut=-1)
{ {
$tab=array(); $tab=array();
@ -2071,6 +2077,7 @@ class Contrat extends CommonObject
* @param string $mode "inactive" pour services a activer, "expired" pour services expires * @param string $mode "inactive" pour services a activer, "expired" pour services expires
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_board($user,$mode) function load_board($user,$mode)
{ {
global $conf, $langs; global $conf, $langs;
@ -2147,6 +2154,7 @@ class Contrat extends CommonObject
* *
* @return int <0 si ko, >0 si ok * @return int <0 si ko, >0 si ok
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_state_board() function load_state_board()
{ {
global $conf, $user; global $conf, $user;
@ -2561,6 +2569,7 @@ class ContratLigne extends CommonObjectLine
* @param string $moreatt More attribute * @param string $moreatt More attribute
* @return string Libelle * @return string Libelle
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function LibStatut($statut,$mode,$expired=-1,$moreatt='') static function LibStatut($statut,$mode,$expired=-1,$moreatt='')
{ {
global $langs; global $langs;
@ -2980,6 +2989,7 @@ class ContratLigne extends CommonObjectLine
* *
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_total() function update_total()
{ {
$this->db->begin(); $this->db->begin();
@ -3099,6 +3109,7 @@ class ContratLigne extends CommonObjectLine
* @param string $comment A comment typed by user * @param string $comment A comment typed by user
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function active_line($user, $date, $date_end = '', $comment = '') function active_line($user, $date, $date_end = '', $comment = '')
{ {
global $langs, $conf; global $langs, $conf;
@ -3156,6 +3167,7 @@ class ContratLigne extends CommonObjectLine
* @param int $notrigger 1=Does not execute triggers, 0=Execute triggers * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function close_line($user, $date_end, $comment = '', $notrigger=0) function close_line($user, $date_end, $comment = '', $notrigger=0)
{ {
global $langs, $conf; global $langs, $conf;

View File

@ -834,6 +834,7 @@ class CMailFile
* @param string $sourcefile Path to file to encode * @param string $sourcefile Path to file to encode
* @return int <0 if KO, encoded string if OK * @return int <0 if KO, encoded string if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _encode_file($sourcefile) function _encode_file($sourcefile)
{ {
$newsourcefile=dol_osencode($sourcefile); $newsourcefile=dol_osencode($sourcefile);
@ -860,6 +861,7 @@ class CMailFile
* *
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function dump_mail() function dump_mail()
{ {
global $conf,$dolibarr_main_data_root; global $conf,$dolibarr_main_data_root;
@ -951,6 +953,7 @@ class CMailFile
* *
* @return string headers * @return string headers
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_smtpheaders() function write_smtpheaders()
{ {
global $conf; global $conf;
@ -1015,6 +1018,7 @@ class CMailFile
* @param array $mimefilename_list Array of mime types * @param array $mimefilename_list Array of mime types
* @return string mime headers * @return string mime headers
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_mimeheaders($filename_list, $mimefilename_list) function write_mimeheaders($filename_list, $mimefilename_list)
{ {
$mimedone=0; $mimedone=0;
@ -1043,6 +1047,7 @@ class CMailFile
* @param string $msgtext Message string * @param string $msgtext Message string
* @return string String content * @return string String content
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_body($msgtext) function write_body($msgtext)
{ {
global $conf; global $conf;
@ -1145,6 +1150,7 @@ class CMailFile
* @param array $mimefilename_list Tableau * @param array $mimefilename_list Tableau
* @return string Chaine fichiers encodes * @return string Chaine fichiers encodes
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_files($filename_list,$mimetype_list,$mimefilename_list) function write_files($filename_list,$mimetype_list,$mimefilename_list)
{ {
$out = ''; $out = '';
@ -1190,6 +1196,7 @@ class CMailFile
* @param array $images_list Tableau * @param array $images_list Tableau
* @return string Chaine images encodees * @return string Chaine images encodees
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_images($images_list) function write_images($images_list)
{ {
$out = ''; $out = '';
@ -1222,6 +1229,7 @@ class CMailFile
* @param int $port Example: 25, 465 * @param int $port Example: 25, 465
* @return int Socket id if ok, 0 if KO * @return int Socket id if ok, 0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function check_server_port($host,$port) function check_server_port($host,$port)
{ {
global $conf; global $conf;
@ -1286,6 +1294,7 @@ class CMailFile
* @param string $response Response string * @param string $response Response string
* @return boolean true if success * @return boolean true if success
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function server_parse($socket, $response) function server_parse($socket, $response)
{ {
$_retVal = true; // Indicates if Object was created or not $_retVal = true; // Indicates if Object was created or not
@ -1512,4 +1521,3 @@ class CMailFile
return $ret; return $ret;
} }
} }

View File

@ -198,6 +198,7 @@ class CSMSFile
* *
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function dump_sms() function dump_sms()
{ {
global $conf,$dolibarr_main_data_root; global $conf,$dolibarr_main_data_root;
@ -228,6 +229,7 @@ class CSMSFile
* @param int $result Result of sms sending * @param int $result Result of sms sending
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function dump_sms_result($result) function dump_sms_result($result)
{ {
global $conf,$dolibarr_main_data_root; global $conf,$dolibarr_main_data_root;
@ -246,4 +248,3 @@ class CSMSFile
} }
} }

View File

@ -54,6 +54,7 @@ class AntiVir
* @param string $file File to scan * @param string $file File to scan
* @return int <0 if KO (-98 if error, -99 if virus), 0 if OK * @return int <0 if KO (-98 if error, -99 if virus), 0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function dol_avscan_file($file) function dol_avscan_file($file)
{ {
global $conf; global $conf;
@ -170,4 +171,3 @@ class AntiVir
} }
} }

View File

@ -130,6 +130,7 @@ class Canvas
* @param string $ref Object ref (if id not provided) * @param string $ref Object ref (if id not provided)
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function assign_values(&$action='view', $id=0, $ref='') function assign_values(&$action='view', $id=0, $ref='')
{ {
if (method_exists($this->control,'assign_values')) $this->control->assign_values($action, $id, $ref); if (method_exists($this->control,'assign_values')) $this->control->assign_values($action, $id, $ref);
@ -156,6 +157,7 @@ class Canvas
* @param string $action Action code * @param string $action Action code
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function display_canvas($action) function display_canvas($action)
{ {
global $db, $conf, $langs, $user, $canvas; global $db, $conf, $langs, $user, $canvas;

View File

@ -328,4 +328,4 @@ class Comment extends CommonObject
return count($this->comments); return count($this->comments);
} }
} }

View File

@ -54,6 +54,7 @@ abstract class CommonDocGenerator
* @param Translate $outputlangs Language object for output * @param Translate $outputlangs Language object for output
* @return array Array of substitution key->code * @return array Array of substitution key->code
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_user($user,$outputlangs) function get_substitutionarray_user($user,$outputlangs)
{ {
global $conf; global $conf;
@ -90,6 +91,7 @@ abstract class CommonDocGenerator
* @param Translate $outputlangs Language object for output * @param Translate $outputlangs Language object for output
* @return array Array of substitution key->code * @return array Array of substitution key->code
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_mysoc($mysoc,$outputlangs) function get_substitutionarray_mysoc($mysoc,$outputlangs)
{ {
global $conf; global $conf;
@ -148,6 +150,7 @@ abstract class CommonDocGenerator
* @param Translate $outputlangs Language object for output * @param Translate $outputlangs Language object for output
* @return array Array of substitution key->code * @return array Array of substitution key->code
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_thirdparty($object,$outputlangs) function get_substitutionarray_thirdparty($object,$outputlangs)
{ {
global $conf; global $conf;
@ -228,7 +231,9 @@ abstract class CommonDocGenerator
* @param array_key $array_key Name of the key for return array * @param array_key $array_key Name of the key for return array
* @return array of substitution key->code * @return array of substitution key->code
*/ */
function get_substitutionarray_contact($object, $outputlangs, $array_key = 'object') { // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_contact($object, $outputlangs, $array_key = 'object')
{
global $conf; global $conf;
if(empty($object->country) && ! empty($object->country_code)) if(empty($object->country) && ! empty($object->country_code))
@ -297,6 +302,7 @@ abstract class CommonDocGenerator
* @param Translate $outputlangs Language object for output * @param Translate $outputlangs Language object for output
* @return array Array of substitution key->code * @return array Array of substitution key->code
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_other($outputlangs) function get_substitutionarray_other($outputlangs)
{ {
global $conf; global $conf;
@ -335,6 +341,7 @@ abstract class CommonDocGenerator
* @param string $array_key Name of the key for return array * @param string $array_key Name of the key for return array
* @return array Array of substitution * @return array Array of substitution
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_object($object,$outputlangs,$array_key='object') function get_substitutionarray_object($object,$outputlangs,$array_key='object')
{ {
global $conf; global $conf;
@ -480,6 +487,7 @@ abstract class CommonDocGenerator
* @param Translate $outputlangs Lang object to use for output * @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array * @return array Return a substitution array
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_lines($line,$outputlangs) function get_substitutionarray_lines($line,$outputlangs)
{ {
global $conf; global $conf;
@ -558,6 +566,7 @@ abstract class CommonDocGenerator
* @param array_key $array_key Name of the key for return array * @param array_key $array_key Name of the key for return array
* @return array Array of substitution * @return array Array of substitution
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_shipment($object,$outputlangs,$array_key='object') function get_substitutionarray_shipment($object,$outputlangs,$array_key='object')
{ {
global $conf; global $conf;
@ -611,12 +620,13 @@ abstract class CommonDocGenerator
/** /**
* Define array with couple substitution key => substitution value * Define array with couple substitution key => substitution value
* *
* @param array $line Array of lines * @param array $line Array of lines
* @param Translate $outputlangs Lang object to use for output * @param Translate $outputlangs Lang object to use for output
* @return array Substitution array * @return array Substitution array
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_shipment_lines($line,$outputlangs) function get_substitutionarray_shipment_lines($line,$outputlangs)
{ {
global $conf; global $conf;
@ -652,6 +662,7 @@ abstract class CommonDocGenerator
* @param boolean $recursive Want to fetch child array or child object * @param boolean $recursive Want to fetch child array or child object
* @return array Array of substitution key->code * @return array Array of substitution key->code
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_each_var_object(&$object,$outputlangs,$recursive=true) { function get_substitutionarray_each_var_object(&$object,$outputlangs,$recursive=true) {
$array_other = array(); $array_other = array();
if(!empty($object)) { if(!empty($object)) {
@ -680,6 +691,7 @@ abstract class CommonDocGenerator
* @param Translate $outputlangs Lang object to use for output * @param Translate $outputlangs Lang object to use for output
* @return array Substitution array * @return array Substitution array
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fill_substitutionarray_with_extrafields($object,$array_to_fill,$extrafields,$array_key,$outputlangs) function fill_substitutionarray_with_extrafields($object,$array_to_fill,$extrafields,$array_key,$outputlangs)
{ {
global $conf; global $conf;
@ -775,4 +787,3 @@ abstract class CommonDocGenerator
$pdf->line($x, $y+$h, $x, $y); $pdf->line($x, $y+$h, $x, $y);
} }
} }

View File

@ -337,6 +337,7 @@ abstract class CommonInvoice extends CommonObject
* *
* @return int <=0 if no, >0 if yes * @return int <=0 if no, >0 if yes
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function is_erasable() function is_erasable()
{ {
global $conf; global $conf;
@ -459,6 +460,7 @@ abstract class CommonInvoice extends CommonObject
* @param int $type Type invoice * @param int $type Type invoice
* @return string Label of status * @return string Label of status
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($paye, $status, $mode=0, $alreadypaid=-1, $type=0) function LibStatut($paye, $status, $mode=0, $alreadypaid=-1, $type=0)
{ {
global $langs; global $langs;
@ -585,8 +587,9 @@ abstract class CommonInvoice extends CommonObject
* conditions de reglements de la facture et date de facturation * conditions de reglements de la facture et date de facturation
* *
* @param integer $cond_reglement Condition of payment (code or id) to use. If 0, we use current condition. * @param integer $cond_reglement Condition of payment (code or id) to use. If 0, we use current condition.
* @return date Date limite de reglement si ok, <0 si ko * @return date Date limite de reglement si ok, <0 si ko
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function calculate_date_lim_reglement($cond_reglement=0) function calculate_date_lim_reglement($cond_reglement=0)
{ {
if (! $cond_reglement) $cond_reglement=$this->cond_reglement_code; if (! $cond_reglement) $cond_reglement=$this->cond_reglement_code;
@ -776,4 +779,3 @@ abstract class CommonInvoiceLine extends CommonObjectLine
$this->db = $db; $this->db = $db;
} }
} }

View File

@ -687,6 +687,7 @@ abstract class CommonObject
* @param int $notrigger Disable all triggers * @param int $notrigger Disable all triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_contact($fk_socpeople, $type_contact, $source='external',$notrigger=0) function add_contact($fk_socpeople, $type_contact, $source='external',$notrigger=0)
{ {
global $user,$langs; global $user,$langs;
@ -807,6 +808,7 @@ abstract class CommonObject
* @param string $source Nature of contact ('internal' or 'external') * @param string $source Nature of contact ('internal' or 'external')
* @return int >0 if OK, <0 if KO * @return int >0 if OK, <0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function copy_linked_contact($objFrom, $source='internal') function copy_linked_contact($objFrom, $source='internal')
{ {
$contacts = $objFrom->liste_contact(-1, $source); $contacts = $objFrom->liste_contact(-1, $source);
@ -830,6 +832,7 @@ abstract class CommonObject
* @param int $fk_socpeople Id of soc_people to update (not modified if 0) * @param int $fk_socpeople Id of soc_people to update (not modified if 0)
* @return int <0 if KO, >= 0 if OK * @return int <0 if KO, >= 0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_contact($rowid, $statut, $type_contact_id=0, $fk_socpeople=0) function update_contact($rowid, $statut, $type_contact_id=0, $fk_socpeople=0)
{ {
// Insert into database // Insert into database
@ -857,6 +860,7 @@ abstract class CommonObject
* @param int $notrigger Disable all triggers * @param int $notrigger Disable all triggers
* @return int >0 if OK, <0 if KO * @return int >0 if OK, <0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function delete_contact($rowid, $notrigger=0) function delete_contact($rowid, $notrigger=0)
{ {
global $user; global $user;
@ -894,6 +898,7 @@ abstract class CommonObject
* @param string $code Type of contact (code or id) * @param string $code Type of contact (code or id)
* @return int >0 if OK, <0 if KO * @return int >0 if OK, <0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function delete_linked_contact($source='',$code='') function delete_linked_contact($source='',$code='')
{ {
$temp = array(); $temp = array();
@ -931,6 +936,7 @@ abstract class CommonObject
* @param string $code Filter on this code of contact type ('SHIPPING', 'BILLING', ...) * @param string $code Filter on this code of contact type ('SHIPPING', 'BILLING', ...)
* @return array Array of contacts * @return array Array of contacts
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function liste_contact($statut=-1,$source='external',$list=0,$code='') function liste_contact($statut=-1,$source='external',$list=0,$code='')
{ {
global $langs; global $langs;
@ -1040,6 +1046,7 @@ abstract class CommonObject
* @param string $code Type of contact (Example: 'CUSTOMER', 'SERVICE') * @param string $code Type of contact (Example: 'CUSTOMER', 'SERVICE')
* @return array Array list of type of contacts (id->label if option=0, code->label if option=1) * @return array Array list of type of contacts (id->label if option=0, code->label if option=1)
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function liste_type_contact($source='internal', $order='position', $option=0, $activeonly=0, $code='') function liste_type_contact($source='internal', $order='position', $option=0, $activeonly=0, $code='')
{ {
global $langs; global $langs;
@ -1149,6 +1156,7 @@ abstract class CommonObject
* @param int $contactid Id du contact. Use this->contactid if empty. * @param int $contactid Id du contact. Use this->contactid if empty.
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_contact($contactid=null) function fetch_contact($contactid=null)
{ {
if (empty($contactid)) $contactid=$this->contactid; if (empty($contactid)) $contactid=$this->contactid;
@ -1168,6 +1176,7 @@ abstract class CommonObject
* @param int $force_thirdparty_id Force thirdparty id * @param int $force_thirdparty_id Force thirdparty id
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_thirdparty($force_thirdparty_id=0) function fetch_thirdparty($force_thirdparty_id=0)
{ {
global $conf; global $conf;
@ -1230,6 +1239,7 @@ abstract class CommonObject
* *
* @return int <0 if KO, 0 if can't guess type of barcode (ISBN, EAN13...), >0 if OK (all barcode properties loaded) * @return int <0 if KO, 0 if can't guess type of barcode (ISBN, EAN13...), >0 if OK (all barcode properties loaded)
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_barcode() function fetch_barcode()
{ {
global $conf; global $conf;
@ -1277,6 +1287,7 @@ abstract class CommonObject
* *
* @return int <0 if KO, >=0 if OK * @return int <0 if KO, >=0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_projet() function fetch_projet()
{ {
include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
@ -1297,6 +1308,7 @@ abstract class CommonObject
* *
* @return int <0 if KO, >=0 if OK * @return int <0 if KO, >=0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_product() function fetch_product()
{ {
include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
@ -1316,6 +1328,7 @@ abstract class CommonObject
* @param int $userid Id du contact * @param int $userid Id du contact
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_user($userid) function fetch_user($userid)
{ {
$user = new User($this->db); $user = new User($this->db);
@ -1329,6 +1342,7 @@ abstract class CommonObject
* *
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_origin() function fetch_origin()
{ {
if ($this->origin == 'shipping') $this->origin = 'expedition'; if ($this->origin == 'shipping') $this->origin = 'expedition';
@ -1498,6 +1512,7 @@ abstract class CommonObject
* @param int $nodbprefix Do not include DB prefix to forge table name * @param int $nodbprefix Do not include DB prefix to forge table name
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_previous_next_ref($filter, $fieldid, $nodbprefix=0) function load_previous_next_ref($filter, $fieldid, $nodbprefix=0)
{ {
global $conf, $user; global $conf, $user;
@ -2134,6 +2149,7 @@ abstract class CommonObject
* @param boolean $fk_parent_line Table with fk_parent_line field or not * @param boolean $fk_parent_line Table with fk_parent_line field or not
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function line_order($renum=false, $rowidorder='ASC', $fk_parent_line=true) function line_order($renum=false, $rowidorder='ASC', $fk_parent_line=true)
{ {
if (! $this->table_element_line) if (! $this->table_element_line)
@ -2251,6 +2267,7 @@ abstract class CommonObject
* @param boolean $fk_parent_line Table with fk_parent_line field or not * @param boolean $fk_parent_line Table with fk_parent_line field or not
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function line_up($rowid, $fk_parent_line=true) function line_up($rowid, $fk_parent_line=true)
{ {
$this->line_order(false, 'ASC', $fk_parent_line); $this->line_order(false, 'ASC', $fk_parent_line);
@ -2269,6 +2286,7 @@ abstract class CommonObject
* @param boolean $fk_parent_line Table with fk_parent_line field or not * @param boolean $fk_parent_line Table with fk_parent_line field or not
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function line_down($rowid, $fk_parent_line=true) function line_down($rowid, $fk_parent_line=true)
{ {
$this->line_order(false, 'ASC', $fk_parent_line); $this->line_order(false, 'ASC', $fk_parent_line);
@ -2311,6 +2329,7 @@ abstract class CommonObject
* @param array $rows Array of rows * @param array $rows Array of rows
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function line_ajaxorder($rows) function line_ajaxorder($rows)
{ {
$num = count($rows); $num = count($rows);
@ -2426,6 +2445,7 @@ abstract class CommonObject
* @param int $fk_parent_line Parent line id * @param int $fk_parent_line Parent line id
* @return int Max value of rang in table of lines * @return int Max value of rang in table of lines
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function line_max($fk_parent_line=0) function line_max($fk_parent_line=0)
{ {
// Search the last rang with fk_parent_line // Search the last rang with fk_parent_line
@ -2472,6 +2492,7 @@ abstract class CommonObject
* @param string $ref_ext Update field ref_ext * @param string $ref_ext Update field ref_ext
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_ref_ext($ref_ext) function update_ref_ext($ref_ext)
{ {
if (! $this->table_element) if (! $this->table_element)
@ -2504,7 +2525,8 @@ abstract class CommonObject
* @param string $suffix '', '_public' or '_private' * @param string $suffix '', '_public' or '_private'
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function update_note($note,$suffix='') // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_note($note, $suffix='')
{ {
global $user; global $user;
@ -2556,6 +2578,7 @@ abstract class CommonObject
* @deprecated * @deprecated
* @see update_note() * @see update_note()
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_note_public($note) function update_note_public($note)
{ {
return $this->update_note($note,'_public'); return $this->update_note($note,'_public');
@ -2571,6 +2594,7 @@ abstract class CommonObject
* @param Societe $seller If roundingadjust is '0' or '1' or maybe 'auto', it means we recalculate total for lines before calculating total for object and for this, we need seller object. * @param Societe $seller If roundingadjust is '0' or '1' or maybe 'auto', it means we recalculate total for lines before calculating total for object and for this, we need seller object.
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_price($exclspec=0,$roundingadjust='none',$nodatabaseupdate=0,$seller=null) function update_price($exclspec=0,$roundingadjust='none',$nodatabaseupdate=0,$seller=null)
{ {
global $conf, $hookmanager, $action; global $conf, $hookmanager, $action;
@ -2807,6 +2831,7 @@ abstract class CommonObject
* @return int <=0 if KO, >0 if OK * @return int <=0 if KO, >0 if OK
* @see fetchObjectLinked, updateObjectLinked, deleteObjectLinked * @see fetchObjectLinked, updateObjectLinked, deleteObjectLinked
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_object_linked($origin=null, $origin_id=null) function add_object_linked($origin=null, $origin_id=null)
{ {
$origin = (! empty($origin) ? $origin : $this->origin); $origin = (! empty($origin) ? $origin : $this->origin);
@ -3565,6 +3590,7 @@ abstract class CommonObject
* *
* @return string incoterms info * @return string incoterms info
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function display_incoterms() function display_incoterms()
{ {
$out = ''; $out = '';
@ -4176,6 +4202,7 @@ abstract class CommonObject
* @param int $mandatory Mandatory or not * @param int $mandatory Mandatory or not
* @return int <=0 if KO, >0 if OK * @return int <=0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_element_resource($resource_id, $resource_type, $busy=0, $mandatory=0) function add_element_resource($resource_id, $resource_type, $busy=0, $mandatory=0)
{ {
$this->db->begin(); $this->db->begin();
@ -4218,6 +4245,7 @@ abstract class CommonObject
* @param int $notrigger Disable all triggers * @param int $notrigger Disable all triggers
* @return int >0 if OK, <0 if KO * @return int >0 if OK, <0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function delete_resource($rowid, $element, $notrigger=0) function delete_resource($rowid, $element, $notrigger=0)
{ {
global $user; global $user;
@ -4603,6 +4631,7 @@ abstract class CommonObject
* @param User $user Object user * @param User $user Object user
* @return int Result of run_triggers * @return int Result of run_triggers
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function call_trigger($trigger_name, $user) function call_trigger($trigger_name, $user)
{ {
global $langs,$conf; global $langs,$conf;
@ -4637,6 +4666,7 @@ abstract class CommonObject
* @param array $optionsArray Array resulting of call of extrafields->fetch_name_optionals_label(). Deprecated. Function must be called without parameters. * @param array $optionsArray Array resulting of call of extrafields->fetch_name_optionals_label(). Deprecated. Function must be called without parameters.
* @return int <0 if error, 0 if no values of extrafield to find nor found, 1 if an attribute is found and value loaded * @return int <0 if error, 0 if no values of extrafield to find nor found, 1 if an attribute is found and value loaded
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_optionals($rowid=null, $optionsArray=null) function fetch_optionals($rowid=null, $optionsArray=null)
{ {
if (empty($rowid)) $rowid=$this->id; if (empty($rowid)) $rowid=$this->id;
@ -6414,6 +6444,7 @@ abstract class CommonObject
* @param int $usesharelink Use the public shared link of image (if not available, the 'nophoto' image will be shown instead) * @param int $usesharelink Use the public shared link of image (if not available, the 'nophoto' image will be shown instead)
* @return string Html code to show photo. Number of photos shown is saved in this->nbphoto * @return string Html code to show photo. Number of photos shown is saved in this->nbphoto
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function show_photos($modulepart, $sdir, $size=0, $nbmax=0, $nbbyrow=5, $showfilename=0, $showaction=0, $maxHeight=120, $maxWidth=160, $nolink=0, $notitle=0, $usesharelink=0) function show_photos($modulepart, $sdir, $size=0, $nbmax=0, $nbbyrow=5, $showfilename=0, $showaction=0, $maxHeight=120, $maxWidth=160, $nolink=0, $notitle=0, $usesharelink=0)
{ {
global $conf,$user,$langs; global $conf,$user,$langs;

View File

@ -62,7 +62,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/format_cards.lib.php';
abstract class CommonStickerGenerator abstract class CommonStickerGenerator
{ {
public $code; // Code of format public $code; // Code of format
public $format; // Array with informations public $format; // Array with informations
// protected // protected
@ -93,7 +93,7 @@ abstract class CommonStickerGenerator
{ {
$this->db = $db; $this->db = $db;
} }
/** /**
* Function to build PDF on disk, then output on HTTP strem. * Function to build PDF on disk, then output on HTTP strem.
* *
@ -103,6 +103,7 @@ abstract class CommonStickerGenerator
* @param string $outputdir Output directory for pdf file * @param string $outputdir Output directory for pdf file
* @return int 1=OK, 0=KO * @return int 1=OK, 0=KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
abstract function write_file($arrayofrecords,$outputlangs,$srctemplatepath,$outputdir=''); abstract function write_file($arrayofrecords,$outputlangs,$srctemplatepath,$outputdir='');
/** /**
@ -114,7 +115,7 @@ abstract class CommonStickerGenerator
* @return void * @return void
*/ */
abstract function addSticker(&$pdf,$outputlangs,$param); abstract function addSticker(&$pdf,$outputlangs,$param);
/** /**
* Methode qui permet de modifier la taille des caracteres * Methode qui permet de modifier la taille des caracteres
* Cela modiera aussi l'espace entre chaque ligne * Cela modiera aussi l'espace entre chaque ligne
@ -123,6 +124,7 @@ abstract class CommonStickerGenerator
* @param int $pt point * @param int $pt point
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function Set_Char_Size(&$pdf,$pt) function Set_Char_Size(&$pdf,$pt)
{ {
if ($pt > 3) { if ($pt > 3) {
@ -130,7 +132,7 @@ abstract class CommonStickerGenerator
$this->_Line_Height = $this->_Get_Height_Chars($pt); $this->_Line_Height = $this->_Get_Height_Chars($pt);
$pdf->SetFont('','',$pt); $pdf->SetFont('','',$pt);
} }
} }
/** /**
* protected Print dot line * protected Print dot line
@ -144,6 +146,7 @@ abstract class CommonStickerGenerator
* @param int $nbPointilles Nb pointilles * @param int $nbPointilles Nb pointilles
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _Pointille(&$pdf,$x1=0,$y1=0,$x2=210,$y2=297,$epaisseur=1,$nbPointilles=15) function _Pointille(&$pdf,$x1=0,$y1=0,$x2=210,$y2=297,$epaisseur=1,$nbPointilles=15)
{ {
$pdf->SetLineWidth($epaisseur); $pdf->SetLineWidth($epaisseur);
@ -185,6 +188,7 @@ abstract class CommonStickerGenerator
* @param int $taille Size * @param int $taille Size
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _Croix(&$pdf,$x1=0,$y1=0,$x2=210,$y2=297,$epaisseur=1,$taille=4) function _Croix(&$pdf,$x1=0,$y1=0,$x2=210,$y2=297,$epaisseur=1,$taille=4)
{ {
$pdf->SetDrawColor(192,192,192); $pdf->SetDrawColor(192,192,192);
@ -216,6 +220,7 @@ abstract class CommonStickerGenerator
* @param string $dest to * @param string $dest to
* @return float value value after conversion * @return float value value after conversion
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _Convert_Metric ($value, $src, $dest) function _Convert_Metric ($value, $src, $dest)
{ {
if ($src != $dest) { if ($src != $dest) {
@ -233,6 +238,7 @@ abstract class CommonStickerGenerator
* @param int $pt Point * @param int $pt Point
* @return int Height chars * @return int Height chars
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _Get_Height_Chars($pt) function _Get_Height_Chars($pt)
{ {
// Tableau de concordance entre la hauteur des caracteres et de l'espacement entre les lignes // Tableau de concordance entre la hauteur des caracteres et de l'espacement entre les lignes
@ -251,19 +257,20 @@ abstract class CommonStickerGenerator
* @param string $format Format * @param string $format Format
* @return void * @return void
*/ */
function _Set_Format(&$pdf, $format) // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _Set_Format(&$pdf, $format)
{ {
$this->_Metric = $format['metric']; $this->_Metric = $format['metric'];
$this->_Avery_Name = $format['name']; $this->_Avery_Name = $format['name'];
$this->_Avery_Code = $format['code']; $this->_Avery_Code = $format['code'];
$this->_Margin_Left = $this->_Convert_Metric($format['marginLeft'], $this->_Metric, $this->_Metric_Doc); $this->_Margin_Left = $this->_Convert_Metric($format['marginLeft'], $this->_Metric, $this->_Metric_Doc);
$this->_Margin_Top = $this->_Convert_Metric($format['marginTop'], $this->_Metric, $this->_Metric_Doc); $this->_Margin_Top = $this->_Convert_Metric($format['marginTop'], $this->_Metric, $this->_Metric_Doc);
$this->_X_Space = $this->_Convert_Metric($format['SpaceX'], $this->_Metric, $this->_Metric_Doc); $this->_X_Space = $this->_Convert_Metric($format['SpaceX'], $this->_Metric, $this->_Metric_Doc);
$this->_Y_Space = $this->_Convert_Metric($format['SpaceY'], $this->_Metric, $this->_Metric_Doc); $this->_Y_Space = $this->_Convert_Metric($format['SpaceY'], $this->_Metric, $this->_Metric_Doc);
$this->_X_Number = $format['NX']; $this->_X_Number = $format['NX'];
$this->_Y_Number = $format['NY']; $this->_Y_Number = $format['NY'];
$this->_Width = $this->_Convert_Metric($format['width'], $this->_Metric, $this->_Metric_Doc); $this->_Width = $this->_Convert_Metric($format['width'], $this->_Metric, $this->_Metric_Doc);
$this->_Height = $this->_Convert_Metric($format['height'], $this->_Metric, $this->_Metric_Doc); $this->_Height = $this->_Convert_Metric($format['height'], $this->_Metric, $this->_Metric_Doc);
$this->Set_Char_Size($pdf, $format['font-size']); $this->Set_Char_Size($pdf, $format['font-size']);
} }

View File

@ -341,6 +341,7 @@ class DiscountAbsolute
* @param int $rowidinvoice Invoice id (To use discount as a credit note to reduc payment of invoice) * @param int $rowidinvoice Invoice id (To use discount as a credit note to reduc payment of invoice)
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function link_to_invoice($rowidline,$rowidinvoice) function link_to_invoice($rowidline,$rowidinvoice)
{ {
// Check parameters // Check parameters
@ -392,6 +393,7 @@ class DiscountAbsolute
* *
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function unlink_invoice() function unlink_invoice()
{ {
$sql ="UPDATE ".MAIN_DB_PREFIX."societe_remise_except"; $sql ="UPDATE ".MAIN_DB_PREFIX."societe_remise_except";

View File

@ -149,6 +149,7 @@ class DolEditor
* @param string $option For ACE editor, set the source language ('html', 'php', 'javascript', ...) * @param string $option For ACE editor, set the source language ('html', 'php', 'javascript', ...)
* @return void|string * @return void|string
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function Create($noprint=0, $morejs='', $disallowAnyContent=true, $titlecontent='', $option='') function Create($noprint=0, $morejs='', $disallowAnyContent=true, $titlecontent='', $option='')
{ {
global $conf,$langs; global $conf,$langs;
@ -347,4 +348,3 @@ class DolEditor
} }
} }

View File

@ -130,6 +130,7 @@ class DolGraph
* @param float $which_prec Precision * @param float $which_prec Precision
* @return boolean * @return boolean
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetPrecisionY($which_prec) function SetPrecisionY($which_prec)
{ {
$this->PrecisionY = $which_prec; $this->PrecisionY = $which_prec;
@ -142,6 +143,7 @@ class DolGraph
* @param float $xi Xi * @param float $xi Xi
* @return boolean True * @return boolean True
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetHorizTickIncrement($xi) function SetHorizTickIncrement($xi)
{ {
$this->horizTickIncrement = $xi; $this->horizTickIncrement = $xi;
@ -154,6 +156,7 @@ class DolGraph
* @param float $xt Xt * @param float $xt Xt
* @return boolean True * @return boolean True
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetNumXTicks($xt) function SetNumXTicks($xt)
{ {
$this->SetNumXTicks = $xt; $this->SetNumXTicks = $xt;
@ -166,6 +169,7 @@ class DolGraph
* @param float $x Label interval * @param float $x Label interval
* @return boolean True * @return boolean True
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetLabelInterval($x) function SetLabelInterval($x)
{ {
$this->labelInterval = $x; $this->labelInterval = $x;
@ -178,6 +182,7 @@ class DolGraph
* @param boolean $bool XGrid or not * @param boolean $bool XGrid or not
* @return boolean true * @return boolean true
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetHideXGrid($bool) function SetHideXGrid($bool)
{ {
$this->hideXGrid = $bool; $this->hideXGrid = $bool;
@ -190,6 +195,7 @@ class DolGraph
* @param boolean $bool YGrid or not * @param boolean $bool YGrid or not
* @return boolean true * @return boolean true
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetHideYGrid($bool) function SetHideYGrid($bool)
{ {
$this->hideYGrid = $bool; $this->hideYGrid = $bool;
@ -202,6 +208,7 @@ class DolGraph
* @param string $label Y label * @param string $label Y label
* @return boolean|null True * @return boolean|null True
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetYLabel($label) function SetYLabel($label)
{ {
$this->YLabel = $label; $this->YLabel = $label;
@ -213,6 +220,7 @@ class DolGraph
* @param int $w Width * @param int $w Width
* @return boolean|null True * @return boolean|null True
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetWidth($w) function SetWidth($w)
{ {
$this->width = $w; $this->width = $w;
@ -224,6 +232,7 @@ class DolGraph
* @param string $title Title * @param string $title Title
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetTitle($title) function SetTitle($title)
{ {
$this->title = $title; $this->title = $title;
@ -236,6 +245,7 @@ class DolGraph
* @return void * @return void
* @see draw_jflot for syntax of data array * @see draw_jflot for syntax of data array
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetData($data) function SetData($data)
{ {
$this->data = $data; $this->data = $data;
@ -247,6 +257,7 @@ class DolGraph
* @param array $datacolor Data color array(array(R,G,B),array(R,G,B)...) * @param array $datacolor Data color array(array(R,G,B),array(R,G,B)...)
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetDataColor($datacolor) function SetDataColor($datacolor)
{ {
$this->datacolor = $datacolor; $this->datacolor = $datacolor;
@ -258,6 +269,7 @@ class DolGraph
* @param array $type Array with type for each serie. Example: array('pie'), array('lines',...,'bars') * @param array $type Array with type for each serie. Example: array('pie'), array('lines',...,'bars')
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetType($type) function SetType($type)
{ {
$this->type = $type; $this->type = $type;
@ -269,6 +281,7 @@ class DolGraph
* @param array $legend Legend. Example: array('seriename1','seriname2',...) * @param array $legend Legend. Example: array('seriename1','seriname2',...)
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetLegend($legend) function SetLegend($legend)
{ {
$this->Legend = $legend; $this->Legend = $legend;
@ -280,6 +293,7 @@ class DolGraph
* @param int $legendwidthmin Min width * @param int $legendwidthmin Min width
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetLegendWidthMin($legendwidthmin) function SetLegendWidthMin($legendwidthmin)
{ {
$this->LegendWidthMin = $legendwidthmin; $this->LegendWidthMin = $legendwidthmin;
@ -291,6 +305,7 @@ class DolGraph
* @param int $max Max value * @param int $max Max value
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetMaxValue($max) function SetMaxValue($max)
{ {
$this->MaxValue = $max; $this->MaxValue = $max;
@ -301,6 +316,7 @@ class DolGraph
* *
* @return int Max value * @return int Max value
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function GetMaxValue() function GetMaxValue()
{ {
return $this->MaxValue; return $this->MaxValue;
@ -312,6 +328,7 @@ class DolGraph
* @param int $min Min value * @param int $min Min value
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetMinValue($min) function SetMinValue($min)
{ {
$this->MinValue = $min; $this->MinValue = $min;
@ -322,6 +339,7 @@ class DolGraph
* *
* @return int Max value * @return int Max value
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function GetMinValue() function GetMinValue()
{ {
return $this->MinValue; return $this->MinValue;
@ -333,6 +351,7 @@ class DolGraph
* @param int $h Height * @param int $h Height
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetHeight($h) function SetHeight($h)
{ {
$this->height = $h; $this->height = $h;
@ -344,6 +363,7 @@ class DolGraph
* @param string $s Shading * @param string $s Shading
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetShading($s) function SetShading($s)
{ {
$this->SetShading = $s; $this->SetShading = $s;
@ -355,6 +375,7 @@ class DolGraph
* @param string $s Shading * @param string $s Shading
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetCssPrefix($s) function SetCssPrefix($s)
{ {
$this->cssprefix = $s; $this->cssprefix = $s;
@ -365,6 +386,7 @@ class DolGraph
* *
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function ResetBgColor() function ResetBgColor()
{ {
unset($this->bgcolor); unset($this->bgcolor);
@ -375,6 +397,7 @@ class DolGraph
* *
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function ResetBgColorGrid() function ResetBgColorGrid()
{ {
unset($this->bgcolorgrid); unset($this->bgcolorgrid);
@ -431,6 +454,7 @@ class DolGraph
* @param array $bg_color array(R,G,B) ou 'onglet' ou 'default' * @param array $bg_color array(R,G,B) ou 'onglet' ou 'default'
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetBgColor($bg_color = array(255,255,255)) function SetBgColor($bg_color = array(255,255,255))
{ {
global $theme_bgcolor,$theme_bgcoloronglet; global $theme_bgcolor,$theme_bgcoloronglet;
@ -459,6 +483,7 @@ class DolGraph
* @param array $bg_colorgrid array(R,G,B) ou 'onglet' ou 'default' * @param array $bg_colorgrid array(R,G,B) ou 'onglet' ou 'default'
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetBgColorGrid($bg_colorgrid = array(255,255,255)) function SetBgColorGrid($bg_colorgrid = array(255,255,255))
{ {
global $theme_bgcolor,$theme_bgcoloronglet; global $theme_bgcolor,$theme_bgcoloronglet;
@ -486,6 +511,7 @@ class DolGraph
* *
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function ResetDataColor() function ResetDataColor()
{ {
unset($this->datacolor); unset($this->datacolor);
@ -496,6 +522,7 @@ class DolGraph
* *
* @return int Max value * @return int Max value
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function GetMaxValueInData() function GetMaxValueInData()
{ {
$k = 0; $k = 0;
@ -521,6 +548,7 @@ class DolGraph
* *
* @return int Min value of all data * @return int Min value of all data
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function GetMinValueInData() function GetMinValueInData()
{ {
$k = 0; $k = 0;
@ -546,6 +574,7 @@ class DolGraph
* *
* @return int Max value of all data * @return int Max value of all data
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function GetCeilMaxValue() function GetCeilMaxValue()
{ {
$max = $this->GetMaxValueInData(); $max = $this->GetMaxValueInData();
@ -569,6 +598,7 @@ class DolGraph
* *
* @return double Max value of all data * @return double Max value of all data
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function GetFloorMinValue() function GetFloorMinValue()
{ {
$min = $this->GetMinValueInData(); $min = $this->GetMinValueInData();
@ -625,6 +655,7 @@ class DolGraph
* @param string $fileurl Url path to show image if saved onto disk * @param string $fileurl Url path to show image if saved onto disk
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
private function draw_artichow($file,$fileurl) private function draw_artichow($file,$fileurl)
{ {
global $artichow_defaultfont; global $artichow_defaultfont;
@ -813,6 +844,7 @@ class DolGraph
* @param string $fileurl Url path to show image if saved onto disk. Never used here. * @param string $fileurl Url path to show image if saved onto disk. Never used here.
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
private function draw_jflot($file,$fileurl) private function draw_jflot($file,$fileurl)
{ {
global $artichow_defaultfont; global $artichow_defaultfont;
@ -1095,4 +1127,3 @@ class DolGraph
} }
} }

View File

@ -45,7 +45,7 @@
* <dol_cut_paper_partial> Cut ticket partially * <dol_cut_paper_partial> Cut ticket partially
* <dol_open_drawer> Open cash drawer * <dol_open_drawer> Open cash drawer
* <dol_activate_buzzer> Activate buzzer * <dol_activate_buzzer> Activate buzzer
* *
* Code which can be placed everywhere * Code which can be placed everywhere
* <dol_print_qrcode> Print QR Code * <dol_print_qrcode> Print QR Code
* <dol_print_date> Print date AAAA-MM-DD * <dol_print_date> Print date AAAA-MM-DD
@ -94,7 +94,7 @@
require_once DOL_DOCUMENT_ROOT .'/includes/mike42/escpos-php/Escpos.php'; require_once DOL_DOCUMENT_ROOT .'/includes/mike42/escpos-php/Escpos.php';
/** /**
* Class to manage Receipt Printers * Class to manage Receipt Printers
*/ */
@ -300,16 +300,16 @@ class dolReceiptPrinter extends Escpos
function selectTypePrinter($selected='', $htmlname='printertypeid') function selectTypePrinter($selected='', $htmlname='printertypeid')
{ {
global $langs; global $langs;
$options = array( $options = array(
1 => $langs->trans('CONNECTOR_DUMMY'), 1 => $langs->trans('CONNECTOR_DUMMY'),
2 => $langs->trans('CONNECTOR_FILE_PRINT'), 2 => $langs->trans('CONNECTOR_FILE_PRINT'),
3 => $langs->trans('CONNECTOR_NETWORK_PRINT'), 3 => $langs->trans('CONNECTOR_NETWORK_PRINT'),
4 => $langs->trans('CONNECTOR_WINDOWS_PRINT') 4 => $langs->trans('CONNECTOR_WINDOWS_PRINT')
); );
$this->resprint = Form::selectarray($htmlname, $options, $selected); $this->resprint = Form::selectarray($htmlname, $options, $selected);
return 0; return 0;
} }
@ -324,7 +324,7 @@ class dolReceiptPrinter extends Escpos
function selectProfilePrinter($selected='', $htmlname='printerprofileid') function selectProfilePrinter($selected='', $htmlname='printerprofileid')
{ {
global $langs; global $langs;
$options = array( $options = array(
0 => $langs->trans('PROFILE_DEFAULT'), 0 => $langs->trans('PROFILE_DEFAULT'),
1 => $langs->trans('PROFILE_SIMPLE'), 1 => $langs->trans('PROFILE_SIMPLE'),
@ -332,7 +332,7 @@ class dolReceiptPrinter extends Escpos
3 => $langs->trans('PROFILE_P822D'), 3 => $langs->trans('PROFILE_P822D'),
4 => $langs->trans('PROFILE_STAR') 4 => $langs->trans('PROFILE_STAR')
); );
$this->profileresprint = Form::selectarray($htmlname, $options, $selected); $this->profileresprint = Form::selectarray($htmlname, $options, $selected);
return 0; return 0;
} }
@ -347,6 +347,7 @@ class dolReceiptPrinter extends Escpos
* @param string $parameter Printer parameter * @param string $parameter Printer parameter
* @return int 0 if OK; >0 if KO * @return int 0 if OK; >0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function AddPrinter($name, $type, $profile, $parameter) function AddPrinter($name, $type, $profile, $parameter)
{ {
global $conf; global $conf;
@ -372,6 +373,7 @@ class dolReceiptPrinter extends Escpos
* @param int $printerid Printer id * @param int $printerid Printer id
* @return int 0 if OK; >0 if KO * @return int 0 if OK; >0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function UpdatePrinter($name, $type, $profile, $parameter, $printerid) function UpdatePrinter($name, $type, $profile, $parameter, $printerid)
{ {
global $conf; global $conf;
@ -396,6 +398,7 @@ class dolReceiptPrinter extends Escpos
* @param int $printerid Printer id * @param int $printerid Printer id
* @return int 0 if OK; >0 if KO * @return int 0 if OK; >0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DeletePrinter($printerid) function DeletePrinter($printerid)
{ {
global $conf; global $conf;
@ -418,6 +421,7 @@ class dolReceiptPrinter extends Escpos
* @param int $templateid Template id * @param int $templateid Template id
* @return int 0 if OK; >0 if KO * @return int 0 if OK; >0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function UpdateTemplate($name, $template, $templateid) function UpdateTemplate($name, $template, $templateid)
{ {
global $conf; global $conf;
@ -441,6 +445,7 @@ class dolReceiptPrinter extends Escpos
* @param int $printerid Printer id * @param int $printerid Printer id
* @return int 0 if OK; >0 if KO * @return int 0 if OK; >0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SendTestToPrinter($printerid) function SendTestToPrinter($printerid)
{ {
global $conf; global $conf;
@ -477,6 +482,7 @@ class dolReceiptPrinter extends Escpos
* @param int $printerid Printer id * @param int $printerid Printer id
* @return int 0 if OK; >0 if KO * @return int 0 if OK; >0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SendToPrinter($object, $templateid, $printerid) function SendToPrinter($object, $templateid, $printerid)
{ {
global $conf; global $conf;
@ -520,11 +526,11 @@ class dolReceiptPrinter extends Escpos
$ret = $this->InitPrinter($printerid); $ret = $this->InitPrinter($printerid);
if ($ret>0) { if ($ret>0) {
setEventMessages($this->error, $this->errors, 'errors'); setEventMessages($this->error, $this->errors, 'errors');
} }
else else
{ {
$nboflines = count($vals); $nboflines = count($vals);
for ($line=0; $line < $nboflines; $line++) for ($line=0; $line < $nboflines; $line++)
{ {
switch ($vals[$line]['tag']) { switch ($vals[$line]['tag']) {
case 'DOL_ALIGN_CENTER': case 'DOL_ALIGN_CENTER':
@ -638,6 +644,7 @@ class dolReceiptPrinter extends Escpos
* @param int $printerid Printer id * @param int $printerid Printer id
* @return int 0 if OK; >0 if KO * @return int 0 if OK; >0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function InitPrinter($printerid) function InitPrinter($printerid)
{ {
global $conf; global $conf;

View File

@ -314,6 +314,7 @@ class EmailSenderProfile 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, 6=Long 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, 6=Long label + Picto
* @return string Label of status * @return string Label of status
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function LibStatut($status,$mode=0) static function LibStatut($status,$mode=0)
{ {
global $langs; global $langs;

View File

@ -748,6 +748,7 @@ class ExtraFields
* @param boolean $forceload Force load of extra fields whatever is option MAIN_EXTRAFIELDS_DISABLED. Deprecated. Should not be required. * @param boolean $forceload Force load of extra fields whatever is option MAIN_EXTRAFIELDS_DISABLED. Deprecated. Should not be required.
* @return array Array of attributes keys+label for all extra fields. * @return array Array of attributes keys+label for all extra fields.
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_name_optionals_label($elementtype,$forceload=false) function fetch_name_optionals_label($elementtype,$forceload=false)
{ {
global $conf; global $conf;

View File

@ -245,6 +245,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
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode=0) function LibStatut($statut,$mode=0)
{ {
global $langs; global $langs;

View File

@ -29,15 +29,14 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php';
class GenericObject extends CommonObject class GenericObject extends CommonObject
{ {
/** /**
* Constructor * Constructor
* *
* @param DoliDB $db Database handler * @param DoliDB $db Database handler
*/ */
function __construct($db) function __construct($db)
{ {
$this->db=$db; $this->db=$db;
} }
} }

View File

@ -658,6 +658,7 @@ class Form
* @param int $disablefavorites Disable favorites * @param int $disablefavorites Disable favorites
* @return string HTML string with select * @return string HTML string with select
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_country($selected='', $htmlname='country_id', $htmloption='', $maxlength=0, $morecss='minwidth300', $usecodeaskey='', $showempty=1, $disablefavorites=0) function select_country($selected='', $htmlname='country_id', $htmloption='', $maxlength=0, $morecss='minwidth300', $usecodeaskey='', $showempty=1, $disablefavorites=0)
{ {
global $conf,$langs; global $conf,$langs;
@ -753,6 +754,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
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_incoterms($selected='', $location_incoterms='', $page='', $htmlname='incoterm_id', $htmloption='', $forcecombo=1, $events=array()) function select_incoterms($selected='', $location_incoterms='', $page='', $htmlname='incoterm_id', $htmloption='', $forcecombo=1, $events=array())
{ {
global $conf,$langs; global $conf,$langs;
@ -844,6 +846,7 @@ class Form
* @param integer $forceall 1=Force to show products and services in combo list, whatever are activated modules, 0=No force, -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, -1=Force none (and set hidden field to 'service')
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_type_of_lines($selected='',$htmlname='type',$showempty=0,$hidetext=0,$forceall=0) function select_type_of_lines($selected='',$htmlname='type',$showempty=0,$hidetext=0,$forceall=0)
{ {
global $db,$langs,$user,$conf; global $db,$langs,$user,$conf;
@ -893,6 +896,7 @@ class Form
* *
* @return int Nb of lines loaded, <0 if KO * @return int Nb of lines loaded, <0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_cache_types_fees() function load_cache_types_fees()
{ {
global $langs; global $langs;
@ -943,6 +947,7 @@ class Form
* @param int $showempty Add an empty field * @param int $showempty Add an empty field
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_type_fees($selected='',$htmlname='type',$showempty=0) function select_type_fees($selected='',$htmlname='type',$showempty=0)
{ {
global $user, $langs; global $user, $langs;
@ -985,6 +990,7 @@ 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)
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_thirdparty($selected='', $htmlname='socid', $filter='', $limit=20, $ajaxoptions=array(), $forcecombo=0) function select_thirdparty($selected='', $htmlname='socid', $filter='', $limit=20, $ajaxoptions=array(), $forcecombo=0)
{ {
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);
@ -1009,6 +1015,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.
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
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) 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)
{ {
global $conf,$user,$langs; global $conf,$user,$langs;
@ -1071,6 +1078,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
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
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) 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)
{ {
global $conf,$user,$langs; global $conf,$user,$langs;
@ -1242,6 +1250,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
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_remises($selected, $htmlname, $filter, $socid, $maxvalue=0) function select_remises($selected, $htmlname, $filter, $socid, $maxvalue=0)
{ {
global $langs,$conf; global $langs,$conf;
@ -1327,6 +1336,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)
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
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='') 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='')
{ {
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);
@ -1481,6 +1491,7 @@ class Form
* @deprecated Use select_dolusers instead * @deprecated Use select_dolusers instead
* @see select_dolusers() * @see select_dolusers()
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_users($selected='',$htmlname='userid',$show_empty=0,$exclude=null,$disabled=0,$include='',$enableonly='',$force_entity='0') function select_users($selected='',$htmlname='userid',$show_empty=0,$exclude=null,$disabled=0,$include='',$enableonly='',$force_entity='0')
{ {
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);
@ -1509,6 +1520,7 @@ class Form
* @return string HTML select string * @return string HTML select string
* @see select_dolgroups * @see select_dolgroups
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
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) 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)
{ {
global $conf,$user,$langs; global $conf,$user,$langs;
@ -1715,6 +1727,7 @@ class Form
* @return string HTML select string * @return string HTML select string
* @see select_dolgroups * @see select_dolgroups
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
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()) 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())
{ {
global $conf, $user, $langs; global $conf, $user, $langs;
@ -1806,6 +1819,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
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
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()) 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())
{ {
global $langs,$conf; global $langs,$conf;
@ -1946,6 +1960,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
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
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='') 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='')
{ {
global $langs,$conf,$user,$db; global $langs,$conf,$user,$db;
@ -2422,6 +2437,7 @@ class Form
* @param int $alsoproductwithnosupplierprice 1=Add also product without supplier prices * @param int $alsoproductwithnosupplierprice 1=Add also product without supplier prices
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_produits_fournisseurs($socid, $selected='', $htmlname='productid', $filtertype='', $filtre='', $ajaxoptions=array(), $hidelabel=0, $alsoproductwithnosupplierprice=0) function select_produits_fournisseurs($socid, $selected='', $htmlname='productid', $filtertype='', $filtre='', $ajaxoptions=array(), $hidelabel=0, $alsoproductwithnosupplierprice=0)
{ {
global $langs,$conf; global $langs,$conf;
@ -2465,6 +2481,7 @@ class Form
* @param int $alsoproductwithnosupplierprice 1=Add also product without supplier prices * @param int $alsoproductwithnosupplierprice 1=Add also product without supplier prices
* @return array Array of keys for json * @return array Array of keys for json
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_produits_fournisseurs_list($socid,$selected='',$htmlname='productid',$filtertype='',$filtre='',$filterkey='',$statut=-1,$outputmode=0,$limit=100,$alsoproductwithnosupplierprice=0) function select_produits_fournisseurs_list($socid,$selected='',$htmlname='productid',$filtertype='',$filtre='',$filterkey='',$statut=-1,$outputmode=0,$limit=100,$alsoproductwithnosupplierprice=0)
{ {
global $langs,$conf,$db; global $langs,$conf,$db;
@ -2687,6 +2704,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
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_product_fourn_price($productid, $htmlname='productfournpriceid', $selected_supplier='') function select_product_fourn_price($productid, $htmlname='productfournpriceid', $selected_supplier='')
{ {
global $langs,$conf; global $langs,$conf;
@ -2799,6 +2817,7 @@ class Form
* @param int $showempty Add an empty field * @param int $showempty Add an empty field
* @return integer|null * @return integer|null
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_address($selected, $socid, $htmlname='address_id',$showempty=0) function select_address($selected, $socid, $htmlname='address_id',$showempty=0)
{ {
// On recherche les utilisateurs // On recherche les utilisateurs
@ -2847,6 +2866,7 @@ class Form
* *
* @return int Nb of lines loaded, <0 if KO * @return int Nb of lines loaded, <0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_cache_conditions_paiements() function load_cache_conditions_paiements()
{ {
global $langs; global $langs;
@ -2894,6 +2914,7 @@ class Form
* *
* @return int Nb of lines loaded, <0 if KO * @return int Nb of lines loaded, <0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_cache_availability() function load_cache_availability()
{ {
global $langs; global $langs;
@ -3060,6 +3081,7 @@ class Form
* *
* @return int Nb of lines loaded, <0 if KO * @return int Nb of lines loaded, <0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_cache_types_paiements() function load_cache_types_paiements()
{ {
global $langs; global $langs;
@ -3120,6 +3142,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
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_conditions_paiements($selected=0, $htmlname='condid', $filtertype=-1, $addempty=0, $noinfoadmin=0, $morecss='') function select_conditions_paiements($selected=0, $htmlname='condid', $filtertype=-1, $addempty=0, $noinfoadmin=0, $morecss='')
{ {
global $langs, $user, $conf; global $langs, $user, $conf;
@ -3165,6 +3188,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
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_types_paiements($selected='', $htmlname='paiementtype', $filtertype='', $format=0, $empty=1, $noadmininfo=0, $maxlength=0, $active=1, $morecss='') function select_types_paiements($selected='', $htmlname='paiementtype', $filtertype='', $format=0, $empty=1, $noadmininfo=0, $maxlength=0, $active=1, $morecss='')
{ {
global $langs,$user; global $langs,$user;
@ -3438,6 +3462,7 @@ class Form
* @param int $showcurrency Show currency in label * @param int $showcurrency Show currency in label
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_comptes($selected='',$htmlname='accountid',$statut=0,$filtre='',$useempty=0,$moreattrib='',$showcurrency=0) function select_comptes($selected='',$htmlname='accountid',$statut=0,$filtre='',$useempty=0,$moreattrib='',$showcurrency=0)
{ {
global $langs, $conf; global $langs, $conf;
@ -3541,6 +3566,7 @@ class Form
* @return string * @return string
* @see select_categories * @see select_categories
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_all_categories($type, $selected='', $htmlname="parent", $maxlength=64, $excludeafterid=0, $outputmode=0) function select_all_categories($type, $selected='', $htmlname="parent", $maxlength=64, $excludeafterid=0, $outputmode=0)
{ {
global $conf, $langs; global $conf, $langs;
@ -3630,6 +3656,7 @@ class Form
* @deprecated * @deprecated
* @see formconfirm() * @see formconfirm()
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_confirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=170, $width=500) function form_confirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=170, $width=500)
{ {
print $this->formconfirm($page, $title, $question, $action, $formquestion, $selectedchoice, $useajax, $height, $width); print $this->formconfirm($page, $title, $question, $action, $formquestion, $selectedchoice, $useajax, $height, $width);
@ -3940,6 +3967,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
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_project($page, $socid, $selected='', $htmlname='projectid', $discard_closed=0, $maxlength=20, $forcefocus=0, $nooutput=0) function form_project($page, $socid, $selected='', $htmlname='projectid', $discard_closed=0, $maxlength=20, $forcefocus=0, $nooutput=0)
{ {
global $langs; global $langs;
@ -3994,6 +4022,7 @@ class Form
* @param int $addempty Add empty entry * @param int $addempty Add empty entry
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_conditions_reglement($page, $selected='', $htmlname='cond_reglement_id', $addempty=0) function form_conditions_reglement($page, $selected='', $htmlname='cond_reglement_id', $addempty=0)
{ {
global $langs; global $langs;
@ -4027,6 +4056,7 @@ class Form
* @param int $addempty Ajoute entree vide * @param int $addempty Ajoute entree vide
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_availability($page, $selected='', $htmlname='availability', $addempty=0) function form_availability($page, $selected='', $htmlname='availability', $addempty=0)
{ {
global $langs; global $langs;
@ -4104,6 +4134,7 @@ class Form
* @return string * @return string
* @see select_date * @see select_date
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_date($page, $selected, $htmlname, $displayhour=0, $displaymin=0, $nooutput=0) function form_date($page, $selected, $htmlname, $displayhour=0, $displaymin=0, $nooutput=0)
{ {
global $langs; global $langs;
@ -4143,6 +4174,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
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_users($page, $selected='', $htmlname='userid', $exclude='', $include='') function form_users($page, $selected='', $htmlname='userid', $exclude='', $include='')
{ {
global $langs; global $langs;
@ -4181,6 +4213,7 @@ class Form
* @param int $active Active or not, -1 = all * @param int $active Active or not, -1 = all
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_modes_reglement($page, $selected='', $htmlname='mode_reglement_id', $filtertype='', $active=1) function form_modes_reglement($page, $selected='', $htmlname='mode_reglement_id', $filtertype='', $active=1)
{ {
global $langs; global $langs;
@ -4213,6 +4246,7 @@ class Form
* @param string $htmlname Name of select html field * @param string $htmlname Name of select html field
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_multicurrency_code($page, $selected='', $htmlname='multicurrency_code') function form_multicurrency_code($page, $selected='', $htmlname='multicurrency_code')
{ {
global $langs; global $langs;
@ -4241,6 +4275,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
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_multicurrency_rate($page, $rate='', $htmlname='multicurrency_tx', $currency='') function form_multicurrency_rate($page, $rate='', $htmlname='multicurrency_tx', $currency='')
{ {
global $langs, $mysoc, $conf; global $langs, $mysoc, $conf;
@ -4288,6 +4323,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
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_remise_dispo($page, $selected, $htmlname, $socid, $amount, $filter='', $maxvalue=0, $more='', $hidelist=0, $discount_type=0) function form_remise_dispo($page, $selected, $htmlname, $socid, $amount, $filter='', $maxvalue=0, $more='', $hidelist=0, $discount_type=0)
{ {
global $conf,$langs; global $conf,$langs;
@ -4377,6 +4413,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
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_contacts($page, $societe, $selected='', $htmlname='contactid') function form_contacts($page, $societe, $selected='', $htmlname='contactid')
{ {
global $langs, $conf; global $langs, $conf;
@ -4425,6 +4462,7 @@ class Form
* @param array $events Event options. 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. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_thirdparty($page, $selected='', $htmlname='socid', $filter='',$showempty=0, $showtype=0, $forcecombo=0, $events=array()) function form_thirdparty($page, $selected='', $htmlname='socid', $filter='',$showempty=0, $showtype=0, $forcecombo=0, $events=array())
{ {
global $langs; global $langs;
@ -4461,6 +4499,7 @@ class Form
* @param string $htmlname name of HTML select list * @param string $htmlname name of HTML select list
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_currency($selected='',$htmlname='currency_id') function select_currency($selected='',$htmlname='currency_id')
{ {
print $this->selectCurrency($selected,$htmlname); print $this->selectCurrency($selected,$htmlname);
@ -4571,6 +4610,7 @@ class Form
* @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
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_cache_vatrates($country_code) function load_cache_vatrates($country_code)
{ {
global $langs; global $langs;
@ -4651,6 +4691,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
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_tva($htmlname='tauxtva', $selectedrate='', $societe_vendeuse='', $societe_acheteuse='', $idprod=0, $info_bits=0, $type='', $options_only=false, $mode=0) function load_tva($htmlname='tauxtva', $selectedrate='', $societe_vendeuse='', $societe_acheteuse='', $idprod=0, $info_bits=0, $type='', $options_only=false, $mode=0)
{ {
global $langs,$conf,$mysoc; global $langs,$conf,$mysoc;
@ -4840,6 +4881,7 @@ class Form
* @return string|null Nothing or string if nooutput is 1 * @return string|null Nothing or string if nooutput is 1
* @see form_date, select_month, select_year, select_dayofweek * @see form_date, select_month, select_year, select_dayofweek
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_date($set_time='', $prefix='re', $h=0, $m=0, $empty=0, $form_name="", $d=1, $addnowlink=0, $nooutput=0, $disabled=0, $fullday='', $addplusone='', $adddateof='') function select_date($set_time='', $prefix='re', $h=0, $m=0, $empty=0, $form_name="", $d=1, $addnowlink=0, $nooutput=0, $disabled=0, $fullday='', $addplusone='', $adddateof='')
{ {
global $conf,$langs; global $conf,$langs;
@ -5206,6 +5248,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|null * @return string|null
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_duration($prefix, $iSecond='', $disabled=0, $typehour='select', $minunderhours=0, $nooutput=0) function select_duration($prefix, $iSecond='', $disabled=0, $typehour='select', $minunderhours=0, $nooutput=0)
{ {
global $langs; global $langs;
@ -6400,6 +6443,7 @@ class Form
* @param int $useempty Affiche valeur vide dans liste * @param int $useempty Affiche valeur vide dans liste
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_export_model($selected='',$htmlname='exportmodelid',$type='',$useempty=0) function select_export_model($selected='',$htmlname='exportmodelid',$type='',$useempty=0)
{ {
@ -6780,6 +6824,7 @@ class Form
* @return string * @return string
* @see select_dolusers * @see select_dolusers
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_dolgroups($selected='', $htmlname='groupid', $show_empty=0, $exclude='', $disabled=0, $include='', $enableonly='', $force_entity='0', $multiple=false) function select_dolgroups($selected='', $htmlname='groupid', $show_empty=0, $exclude='', $disabled=0, $include='', $enableonly='', $force_entity='0', $multiple=false)
{ {
global $conf,$user,$langs; global $conf,$user,$langs;
@ -7109,4 +7154,3 @@ class Form
} }
} }

View File

@ -62,6 +62,7 @@ class FormAccounting extends Form
* @param int $disabledajaxcombo Disable ajax combo box. * @param int $disabledajaxcombo Disable ajax combo box.
* @return string String with HTML select * @return string String with HTML select
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_journal($selectid, $htmlname = 'journal', $nature=0, $showempty = 0, $select_in = 0, $select_out = 0, $morecss='maxwidth300 maxwidthonsmartphone', $usecache='', $disabledajaxcombo=0) function select_journal($selectid, $htmlname = 'journal', $nature=0, $showempty = 0, $select_in = 0, $select_out = 0, $morecss='maxwidth300 maxwidthonsmartphone', $usecache='', $disabledajaxcombo=0)
{ {
global $conf,$langs; global $conf,$langs;
@ -141,6 +142,7 @@ class FormAccounting extends Form
* @param int $allcountries All countries * @param int $allcountries All countries
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_accounting_category($selected='',$htmlname='account_category', $useempty=0, $maxlen=0, $help=1, $allcountries=0) function select_accounting_category($selected='',$htmlname='account_category', $useempty=0, $maxlen=0, $help=1, $allcountries=0)
{ {
global $db,$langs,$user,$mysoc; global $db,$langs,$user,$mysoc;
@ -216,6 +218,7 @@ class FormAccounting extends Form
* @param string $selectedkey Value * @param string $selectedkey Value
* @return string HTML edit field * @return string HTML edit field
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_bookkeeping_importkey($htmlname = 'importkey', $selectedkey = '') { function select_bookkeeping_importkey($htmlname = 'importkey', $selectedkey = '') {
$options = array(); $options = array();
@ -252,6 +255,7 @@ class FormAccounting extends Form
* @param string $usecache Key to use to store result into a cache. Next call with same key will reuse the cache. * @param string $usecache Key to use to store result into a cache. Next call with same key will reuse the cache.
* @return string String with HTML select * @return string String with HTML select
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $morecss='maxwidth300 maxwidthonsmartphone', $usecache='') function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $morecss='maxwidth300 maxwidthonsmartphone', $usecache='')
{ {
global $conf, $langs; global $conf, $langs;
@ -339,6 +343,7 @@ class FormAccounting extends Form
* @param string $morecss More css * @param string $morecss More css
* @return string String with HTML select * @return string String with HTML select
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_auxaccount($selectid, $htmlname='account_num_aux', $showempty=0, $morecss='maxwidth200') { function select_auxaccount($selectid, $htmlname='account_num_aux', $showempty=0, $morecss='maxwidth200') {
$aux_account = array(); $aux_account = array();
@ -398,6 +403,7 @@ class FormAccounting extends Form
* @param string $output_format (html/opton (for option html only)/array (to return options arrays * @param string $output_format (html/opton (for option html only)/array (to return options arrays
* @return string/array * @return string/array
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function selectyear_accountancy_bookkepping($selected = '', $htmlname = 'yearid', $useempty = 0, $output_format = 'html') function selectyear_accountancy_bookkepping($selected = '', $htmlname = 'yearid', $useempty = 0, $output_format = 'html')
{ {
global $conf; global $conf;
@ -428,4 +434,3 @@ class FormAccounting extends Form
} }
} }
} }

View File

@ -57,6 +57,7 @@ class FormActions
* @param string $morecss More css on select field * @param string $morecss More css on select field
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_select_status_action($formname, $selected, $canedit=1, $htmlname='complete', $showempty=0, $onlyselect=0, $morecss='maxwidth100') function form_select_status_action($formname, $selected, $canedit=1, $htmlname='complete', $showempty=0, $onlyselect=0, $morecss='maxwidth100')
{ {
global $langs,$conf; global $langs,$conf;
@ -318,6 +319,7 @@ class FormActions
* @param int $nooutput 1=No output * @param int $nooutput 1=No output
* @return string * @return string
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_type_actions($selected='', $htmlname='actioncode', $excludetype='', $onlyautoornot=0, $hideinfohelp=0, $multiselect=0, $nooutput=0) function select_type_actions($selected='', $htmlname='actioncode', $excludetype='', $onlyautoornot=0, $hideinfohelp=0, $multiselect=0, $nooutput=0)
{ {
global $langs,$user,$form,$conf; global $langs,$user,$form,$conf;

View File

@ -57,7 +57,8 @@ class FormAdmin
* @param string $morecss Add more css styles * @param string $morecss Add more css styles
* @param int $showcode Add language code into label * @param int $showcode Add language code into label
* @return string Return HTML select string with list of languages * @return string Return HTML select string with list of languages
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_language($selected='', $htmlname='lang_id', $showauto=0, $filter=null, $showempty='', $showwarning=0, $disabled=0, $morecss='', $showcode=0) function select_language($selected='', $htmlname='lang_id', $showauto=0, $filter=null, $showempty='', $showwarning=0, $disabled=0, $morecss='', $showcode=0)
{ {
global $langs; global $langs;
@ -124,6 +125,7 @@ class FormAdmin
* @param string $moreattrib More attributes on html select tag * @param string $moreattrib More attributes on html select tag
* @return integer|null * @return integer|null
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_menu($selected, $htmlname, $dirmenuarray, $moreattrib='') function select_menu($selected, $htmlname, $dirmenuarray, $moreattrib='')
{ {
global $langs,$conf; global $langs,$conf;
@ -212,6 +214,7 @@ class FormAdmin
* @param string[] $dirmenuarray Directories to scan * @param string[] $dirmenuarray Directories to scan
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_menu_families($selected, $htmlname, $dirmenuarray) function select_menu_families($selected, $htmlname, $dirmenuarray)
{ {
global $langs,$conf; global $langs,$conf;
@ -282,6 +285,7 @@ class FormAdmin
* @param string $htmlname Nom de la zone select * @param string $htmlname Nom de la zone select
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_timezone($selected,$htmlname) function select_timezone($selected,$htmlname)
{ {
global $langs,$conf; global $langs,$conf;
@ -328,14 +332,15 @@ class FormAdmin
/** /**
* Return html select list with available languages (key='en_US', value='United States' for example) * Return html select list with available languages (key='en_US', value='United States' for example)
* *
* @param string $selected Paper format pre-selected * @param string $selected Paper format pre-selected
* @param string $htmlname Name of HTML select field * @param string $htmlname Name of HTML select field
* @param string $filter Value to filter on code * @param string $filter Value to filter on code
* @param int $showempty Add empty value * @param int $showempty Add empty value
* @return string Return HTML output * @return string Return HTML output
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_paper_format($selected='',$htmlname='paperformat_id',$filter=0,$showempty=0) function select_paper_format($selected='',$htmlname='paperformat_id',$filter=0,$showempty=0)
{ {
global $langs; global $langs;

View File

@ -104,6 +104,7 @@ class FormBarCode
* @param int $useempty Affiche valeur vide dans liste * @param int $useempty Affiche valeur vide dans liste
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_barcode_type($selected='',$htmlname='barcodetype_id',$useempty=0) function select_barcode_type($selected='',$htmlname='barcodetype_id',$useempty=0)
{ {
global $langs,$conf; global $langs,$conf;
@ -163,6 +164,7 @@ class FormBarCode
* @param string $htmlname Nom du formulaire select * @param string $htmlname Nom du formulaire select
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_barcode_type($page, $selected='', $htmlname='barcodetype_id') function form_barcode_type($page, $selected='', $htmlname='barcodetype_id')
{ {
global $langs,$conf; global $langs,$conf;
@ -181,4 +183,3 @@ class FormBarCode
} }
} }

View File

@ -35,7 +35,6 @@ class FormCompany
var $error; var $error;
/** /**
* Constructor * Constructor
* *
@ -56,6 +55,7 @@ class FormCompany
* @param string $filter Add a SQL filter to select * @param string $filter Add a SQL filter to select
* @return array Array of types * @return array Array of types
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function typent_array($mode=0, $filter='') function typent_array($mode=0, $filter='')
{ {
global $langs,$mysoc; global $langs,$mysoc;
@ -97,6 +97,7 @@ class FormCompany
* @param string $filter Add a SQL filter to select * @param string $filter Add a SQL filter to select
* @return array Array of types d'effectifs * @return array Array of types d'effectifs
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function effectif_array($mode=0, $filter='') function effectif_array($mode=0, $filter='')
{ {
$effs = array(); $effs = array();
@ -137,6 +138,7 @@ class FormCompany
* @param int $empty Add empty value in list * @param int $empty Add empty value in list
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_prospect_level($page, $selected='', $htmlname='prospect_level_id', $empty=0) function form_prospect_level($page, $selected='', $htmlname='prospect_level_id', $empty=0)
{ {
global $user, $langs; global $user, $langs;
@ -189,6 +191,7 @@ class FormCompany
* @param string $htmlname Id of department * @param string $htmlname Id of department
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_departement($selected='',$country_codeid=0, $htmlname='state_id') function select_departement($selected='',$country_codeid=0, $htmlname='state_id')
{ {
print $this->select_state($selected,$country_codeid, $htmlname); print $this->select_state($selected,$country_codeid, $htmlname);
@ -207,6 +210,7 @@ class FormCompany
* @return string String with HTML select * @return string String with HTML select
* @see select_country * @see select_country
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_state($selected='',$country_codeid=0, $htmlname='state_id') function select_state($selected='',$country_codeid=0, $htmlname='state_id')
{ {
global $conf,$langs,$user; global $conf,$langs,$user;
@ -316,6 +320,7 @@ class FormCompany
* @param string $htmlname Name of HTML select field * @param string $htmlname Name of HTML select field
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_region($selected='',$htmlname='region_id') function select_region($selected='',$htmlname='region_id')
{ {
global $conf,$langs; global $conf,$langs;
@ -380,6 +385,7 @@ class FormCompany
* @param string $morecss Add more css on SELECT element * @param string $morecss Add more css on SELECT element
* @return string String with HTML select * @return string String with HTML select
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_civility($selected='',$htmlname='civility_id',$morecss='maxwidth100') function select_civility($selected='',$htmlname='civility_id',$morecss='maxwidth100')
{ {
global $conf,$langs,$user; global $conf,$langs,$user;
@ -439,6 +445,7 @@ class FormCompany
* @deprecated Use print xxx->select_juridicalstatus instead * @deprecated Use print xxx->select_juridicalstatus instead
* @see select_juridicalstatus() * @see select_juridicalstatus()
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_forme_juridique($selected='', $country_codeid=0, $filter='') function select_forme_juridique($selected='', $country_codeid=0, $filter='')
{ {
print $this->select_juridicalstatus($selected, $country_codeid, $filter); print $this->select_juridicalstatus($selected, $country_codeid, $filter);
@ -454,6 +461,7 @@ class FormCompany
* @param string $htmlname HTML name of select * @param string $htmlname HTML name of select
* @return string String with HTML select * @return string String with HTML select
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_juridicalstatus($selected='', $country_codeid=0, $filter='', $htmlname='forme_juridique_code') function select_juridicalstatus($selected='', $country_codeid=0, $filter='', $htmlname='forme_juridique_code')
{ {
global $conf,$langs,$user; global $conf,$langs,$user;
@ -750,6 +758,7 @@ class FormCompany
* @param string $morecss More css * @param string $morecss More css
* @return string * @return string
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_ziptown($selected='', $htmlname='zipcode', $fields='', $fieldsize=0, $disableautocomplete=0, $moreattrib='',$morecss='') function select_ziptown($selected='', $htmlname='zipcode', $fields='', $fieldsize=0, $disableautocomplete=0, $moreattrib='',$morecss='')
{ {
global $conf; global $conf;
@ -779,6 +788,7 @@ class FormCompany
* @param string $morecss More css * @param string $morecss More css
* @return string HTML string with prof id * @return string HTML string with prof id
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_input_id_prof($idprof,$htmlname,$preselected,$country_code,$morecss='maxwidth100onsmartphone quatrevingtpercent') function get_input_id_prof($idprof,$htmlname,$preselected,$country_code,$morecss='maxwidth100onsmartphone quatrevingtpercent')
{ {
global $conf,$langs; global $conf,$langs;
@ -827,6 +837,7 @@ class FormCompany
* @param string $htmlname HTML select name * @param string $htmlname HTML select name
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_localtax($local, $selected, $htmlname) function select_localtax($local, $selected, $htmlname)
{ {
$tax=get_localtax_by_third($local); $tax=get_localtax_by_third($local);
@ -861,4 +872,3 @@ class FormCompany
} }
} }

View File

@ -52,6 +52,7 @@ class FormContract
* @param int $showempty Show empty line * @param int $showempty Show empty line
* @return int Nbr of project if OK, <0 if KO * @return int Nbr of project if OK, <0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_contract($socid=-1, $selected='', $htmlname='contrattid', $maxlength=16, $showempty=1) function select_contract($socid=-1, $selected='', $htmlname='contrattid', $maxlength=16, $showempty=1)
{ {
global $db,$user,$conf,$langs; global $db,$user,$conf,$langs;
@ -67,14 +68,14 @@ class FormContract
if ($socid > 0) if ($socid > 0)
{ {
// CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY is 'all' or a list of ids separated by coma. // CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY is 'all' or a list of ids separated by coma.
if (empty($conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY)) if (empty($conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY))
$sql.= " AND (c.fk_soc=".$socid." OR c.fk_soc IS NULL)"; $sql.= " AND (c.fk_soc=".$socid." OR c.fk_soc IS NULL)";
else if ($conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY != 'all') else if ($conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY != 'all')
{ {
$sql.= " AND (c.fk_soc IN (".$socid.", ".$conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY.") "; $sql.= " AND (c.fk_soc IN (".$socid.", ".$conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY.") ";
$sql.= " OR c.fk_soc IS NULL)"; $sql.= " OR c.fk_soc IS NULL)";
} }
} }
if ($socid == 0) $sql.= " AND (c.fk_soc = 0 OR c.fk_soc IS NULL)"; if ($socid == 0) $sql.= " AND (c.fk_soc = 0 OR c.fk_soc IS NULL)";
$sql.= " ORDER BY c.ref "; $sql.= " ORDER BY c.ref ";
@ -140,14 +141,14 @@ class FormContract
} }
print '</select>'; print '</select>';
$db->free($resql); $db->free($resql);
if (!empty($conf->use_javascript_ajax)) if (!empty($conf->use_javascript_ajax))
{ {
// Make select dynamic // Make select dynamic
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php'; include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
print ajax_combobox($htmlname); print ajax_combobox($htmlname);
} }
return $num; return $num;
} }
else else
@ -156,7 +157,7 @@ class FormContract
return -1; return -1;
} }
} }
/** /**
* Show a form to select a contract * Show a form to select a contract
* *
@ -168,10 +169,10 @@ class FormContract
* @param int $showempty Show empty line * @param int $showempty Show empty line
* @return int Nbr of project if OK, <0 if KO * @return int Nbr of project if OK, <0 if KO
*/ */
function formSelectContract($page, $socid=-1, $selected='', $htmlname='contrattid', $maxlength=16, $showempty=1) function formSelectContract($page, $socid=-1, $selected='', $htmlname='contrattid', $maxlength=16, $showempty=1)
{ {
global $langs; global $langs;
print "\n"; print "\n";
print '<form method="post" action="'.$page.'">'; print '<form method="post" action="'.$page.'">';
print '<input type="hidden" name="action" value="setcontract">'; print '<input type="hidden" name="action" value="setcontract">';
@ -179,6 +180,6 @@ class FormContract
$this->select_contract($socid, $selected, $htmlname, $maxlength, $showempty); $this->select_contract($socid, $selected, $htmlname, $maxlength, $showempty);
print '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; print '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
print '</form>'; print '</form>';
} }
} }

View File

@ -51,6 +51,7 @@ class FormCron extends Form
* @param integer $readonly Select is read only or not * @param integer $readonly Select is read only or not
* @return string HTML select field * @return string HTML select field
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_typejob($htmlname,$selected=0,$readonly=0) function select_typejob($htmlname,$selected=0,$readonly=0)
{ {
global $langs; global $langs;

View File

@ -73,6 +73,7 @@ class FormFile
* @param string $sectiondir If upload must be done inside a particular directory (is sectiondir defined, sectionid must not be) * @param string $sectiondir If upload must be done inside a particular directory (is sectiondir defined, sectionid must not be)
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_attach_new_file($url, $title='', $addcancel=0, $sectionid=0, $perm=1, $size=50, $object='', $options='', $useajax=1, $savingdocmask='', $linkfiles=1, $htmlname='formuserfile', $accept='', $sectiondir='') function form_attach_new_file($url, $title='', $addcancel=0, $sectionid=0, $perm=1, $size=50, $object='', $options='', $useajax=1, $savingdocmask='', $linkfiles=1, $htmlname='formuserfile', $accept='', $sectiondir='')
{ {
global $conf,$langs, $hookmanager; global $conf,$langs, $hookmanager;
@ -248,6 +249,7 @@ class FormFile
* @return int <0 if KO, number of shown files if OK * @return int <0 if KO, number of shown files if OK
* @deprecated Use print xxx->showdocuments() instead. * @deprecated Use print xxx->showdocuments() instead.
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function show_documents($modulepart,$modulesubdir,$filedir,$urlsource,$genallowed,$delallowed=0,$modelselected='',$allowgenifempty=1,$forcenomultilang=0,$iconPDF=0,$notused=0,$noform=0,$param='',$title='',$buttonlabel='',$codelang='') function show_documents($modulepart,$modulesubdir,$filedir,$urlsource,$genallowed,$delallowed=0,$modelselected='',$allowgenifempty=1,$forcenomultilang=0,$iconPDF=0,$notused=0,$noform=0,$param='',$title='',$buttonlabel='',$codelang='')
{ {
$this->numoffiles=0; $this->numoffiles=0;
@ -1003,6 +1005,7 @@ class FormFile
* @return int <0 if KO, nb of files shown if OK * @return int <0 if KO, nb of files shown if OK
* @see list_of_autoecmfiles * @see list_of_autoecmfiles
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function list_of_documents($filearray,$object,$modulepart,$param='',$forcedownload=0,$relativepath='',$permonobject=1,$useinecm=0,$textifempty='',$maxlength=0,$title='',$url='', $showrelpart=0, $permtoeditline=-1,$upload_dir='',$sortfield='',$sortorder='ASC', $disablemove=1, $addfilterfields=0) function list_of_documents($filearray,$object,$modulepart,$param='',$forcedownload=0,$relativepath='',$permonobject=1,$useinecm=0,$textifempty='',$maxlength=0,$title='',$url='', $showrelpart=0, $permtoeditline=-1,$upload_dir='',$sortfield='',$sortorder='ASC', $disablemove=1, $addfilterfields=0)
{ {
global $user, $conf, $langs, $hookmanager; global $user, $conf, $langs, $hookmanager;
@ -1390,6 +1393,7 @@ class FormFile
* @return int <0 if KO, nb of files shown if OK * @return int <0 if KO, nb of files shown if OK
* @see list_of_documents * @see list_of_documents
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function list_of_autoecmfiles($upload_dir, $filearray, $modulepart, $param, $forcedownload=0, $relativepath='', $permtodelete=1, $useinecm=0, $textifempty='', $maxlength=0, $url='', $addfilterfields=0) function list_of_autoecmfiles($upload_dir, $filearray, $modulepart, $param, $forcedownload=0, $relativepath='', $permtodelete=1, $useinecm=0, $textifempty='', $maxlength=0, $url='', $addfilterfields=0)
{ {
global $user, $conf, $langs, $form; global $user, $conf, $langs, $form;
@ -1828,4 +1832,3 @@ class FormFile
} }
} }

View File

@ -52,6 +52,7 @@ class FormIntervention
* @param int $showempty Show empty line * @param int $showempty Show empty line
* @return int Nbre of project if OK, <0 if KO * @return int Nbre of project if OK, <0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_interventions($socid=-1, $selected='', $htmlname='interventionid', $maxlength=16, $showempty=1) function select_interventions($socid=-1, $selected='', $htmlname='interventionid', $maxlength=16, $showempty=1)
{ {
global $db,$user,$conf,$langs; global $db,$user,$conf,$langs;

View File

@ -132,6 +132,7 @@ class FormMail extends Form
* *
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function clear_attached_files() function clear_attached_files()
{ {
global $conf,$user; global $conf,$user;
@ -156,6 +157,7 @@ class FormMail extends Form
* @param string $type Mime type (can be dol_mimetype($file)) * @param string $type Mime type (can be dol_mimetype($file))
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_attached_files($path, $file='', $type='') function add_attached_files($path, $file='', $type='')
{ {
$listofpaths=array(); $listofpaths=array();
@ -186,6 +188,7 @@ class FormMail extends Form
* @param string $keytodelete Key in file array (0, 1, 2, ...) * @param string $keytodelete Key in file array (0, 1, 2, ...)
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function remove_attached_files($keytodelete) function remove_attached_files($keytodelete)
{ {
$listofpaths=array(); $listofpaths=array();
@ -213,6 +216,7 @@ class FormMail extends Form
* *
* @return array array('paths'=> ,'names'=>, 'mimes'=> ) * @return array array('paths'=> ,'names'=>, 'mimes'=> )
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_attached_files() function get_attached_files()
{ {
$listofpaths=array(); $listofpaths=array();
@ -235,6 +239,7 @@ class FormMail extends Form
* @param string $removefileaction Name of action when removing file attachments * @param string $removefileaction Name of action when removing file attachments
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function show_form($addfileaction='addfile',$removefileaction='removefile') function show_form($addfileaction='addfile',$removefileaction='removefile')
{ {
print $this->get_form($addfileaction,$removefileaction); print $this->get_form($addfileaction,$removefileaction);
@ -250,6 +255,7 @@ class FormMail extends Form
* @param string $removefileaction Name of action when removing file attachments * @param string $removefileaction Name of action when removing file attachments
* @return string Form to show * @return string Form to show
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_form($addfileaction='addfile', $removefileaction='removefile') function get_form($addfileaction='addfile', $removefileaction='removefile')
{ {
global $conf, $langs, $user, $hookmanager, $form; global $conf, $langs, $user, $hookmanager, $form;

View File

@ -64,7 +64,8 @@ class FormOther
* @param int $fk_user Utilisateur créant le modèle * @param int $fk_user Utilisateur créant le modèle
* @return void * @return void
*/ */
function select_export_model($selected='',$htmlname='exportmodelid',$type='',$useempty=0, $fk_user=null) // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_export_model($selected='', $htmlname='exportmodelid', $type='', $useempty=0, $fk_user=null)
{ {
$sql = "SELECT rowid, label"; $sql = "SELECT rowid, label";
$sql.= " FROM ".MAIN_DB_PREFIX."export_model"; $sql.= " FROM ".MAIN_DB_PREFIX."export_model";
@ -114,7 +115,8 @@ class FormOther
* @param int $useempty Affiche valeur vide dans liste * @param int $useempty Affiche valeur vide dans liste
* @return void * @return void
*/ */
function select_import_model($selected='',$htmlname='importmodelid',$type='',$useempty=0) // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_import_model($selected='', $htmlname='importmodelid', $type='', $useempty=0)
{ {
$sql = "SELECT rowid, label"; $sql = "SELECT rowid, label";
$sql.= " FROM ".MAIN_DB_PREFIX."import_model"; $sql.= " FROM ".MAIN_DB_PREFIX."import_model";
@ -161,7 +163,8 @@ class FormOther
* @param string $htmlname Name of combo list * @param string $htmlname Name of combo list
* @return integer * @return integer
*/ */
function select_ecotaxes($selected='',$htmlname='ecotaxe_id') // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_ecotaxes($selected='', $htmlname='ecotaxe_id')
{ {
global $langs; global $langs;
@ -218,7 +221,8 @@ class FormOther
* @param string $country_code Country Code * @param string $country_code Country Code
* @return string HTML select list * @return string HTML select list
*/ */
function select_revenue_stamp($selected='',$htmlname='revenuestamp',$country_code='') // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_revenue_stamp($selected='', $htmlname='revenuestamp', $country_code='')
{ {
global $langs; global $langs;
@ -279,6 +283,7 @@ class FormOther
* @param int $showempty Add also an empty line * @param int $showempty Add also an empty line
* @return string HTML select string * @return string HTML select string
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_percent($selected=0,$htmlname='percent',$disabled=0,$increment=5,$start=0,$end=100,$showempty=0) function select_percent($selected=0,$htmlname='percent',$disabled=0,$increment=5,$start=0,$end=100,$showempty=0)
{ {
$return = '<select class="flat" name="'.$htmlname.'" '.($disabled?'disabled':'').'>'; $return = '<select class="flat" name="'.$htmlname.'" '.($disabled?'disabled':'').'>';
@ -315,6 +320,7 @@ class FormOther
* @return string Html combo list code * @return string Html combo list code
* @see select_all_categories * @see select_all_categories
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_categories($type, $selected=0, $htmlname='search_categ', $nocateg=0, $showempty=1, $morecss='') function select_categories($type, $selected=0, $htmlname='search_categ', $nocateg=0, $showempty=1, $morecss='')
{ {
global $conf, $langs; global $conf, $langs;
@ -374,6 +380,7 @@ class FormOther
* @param string $morecss More CSS * @param string $morecss More CSS
* @return string Html combo list code * @return string Html combo list code
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_salesrepresentatives($selected,$htmlname,$user,$showstatus=0,$showempty=1,$morecss='') function select_salesrepresentatives($selected,$htmlname,$user,$showstatus=0,$showempty=1,$morecss='')
{ {
global $conf,$langs; global $conf,$langs;
@ -629,6 +636,7 @@ class FormOther
* @deprecated Use instead selectColor * @deprecated Use instead selectColor
* @see selectColor() * @see selectColor()
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_color($set_color='', $prefix='f_color', $form_name='', $showcolorbox=1, $arrayofcolors='') function select_color($set_color='', $prefix='f_color', $form_name='', $showcolorbox=1, $arrayofcolors='')
{ {
print $this->selectColor($set_color, $prefix, $form_name, $showcolorbox, $arrayofcolors); print $this->selectColor($set_color, $prefix, $form_name, $showcolorbox, $arrayofcolors);
@ -744,6 +752,7 @@ class FormOther
* @param int $y Hauteur de l'image en pixels * @param int $y Hauteur de l'image en pixels
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function CreateColorIcon($color,$module,$name,$x='12',$y='12') function CreateColorIcon($color,$module,$name,$x='12',$y='12')
{ {
global $conf; global $conf;
@ -781,6 +790,7 @@ class FormOther
* @param int $useempty Affiche valeur vide dans liste * @param int $useempty Affiche valeur vide dans liste
* @return string * @return string
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_dayofweek($selected='',$htmlname='weekid',$useempty=0) function select_dayofweek($selected='',$htmlname='weekid',$useempty=0)
{ {
global $langs; global $langs;
@ -825,6 +835,7 @@ class FormOther
* @param string $morecss More Css * @param string $morecss More Css
* @return string * @return string
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_month($selected='', $htmlname='monthid', $useempty=0, $longlabel=0, $morecss='') function select_month($selected='', $htmlname='monthid', $useempty=0, $longlabel=0, $morecss='')
{ {
global $langs; global $langs;
@ -870,6 +881,7 @@ class FormOther
* @param string $morecss More CSS * @param string $morecss More CSS
* @return string * @return string
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_year($selected='',$htmlname='yearid',$useempty=0, $min_year=10, $max_year=5, $offset=0, $invert=0, $option='', $morecss='valignmiddle widthauto') function select_year($selected='',$htmlname='yearid',$useempty=0, $min_year=10, $max_year=5, $offset=0, $invert=0, $option='', $morecss='valignmiddle widthauto')
{ {
print $this->selectyear($selected,$htmlname,$useempty,$min_year,$max_year,$offset,$invert,$option,$morecss); print $this->selectyear($selected,$htmlname,$useempty,$min_year,$max_year,$offset,$invert,$option,$morecss);
@ -939,6 +951,7 @@ class FormOther
* @param int $originid Id de l'origine * @param int $originid Id de l'origine
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_address($page, $selected, $socid, $htmlname='address_id', $origin='', $originid='') function form_address($page, $selected, $socid, $htmlname='address_id', $origin='', $originid='')
{ {
global $langs,$conf; global $langs,$conf;
@ -1201,6 +1214,7 @@ class FormOther
* @param string $moreattrib More attributes on HTML select tag * @param string $moreattrib More attributes on HTML select tag
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_dictionary($htmlname,$dictionarytable,$keyfield='code',$labelfield='label',$selected='',$useempty=0,$moreattrib='') function select_dictionary($htmlname,$dictionarytable,$keyfield='code',$labelfield='label',$selected='',$useempty=0,$moreattrib='')
{ {
global $langs, $conf; global $langs, $conf;
@ -1253,4 +1267,3 @@ class FormOther
} }
} }

View File

@ -64,6 +64,7 @@ class FormProjets
* @param int $htmlid Html id to use instead of htmlname * @param int $htmlid Html id to use instead of htmlname
* @return string Return html content * @return string Return html content
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_projects($socid=-1, $selected='', $htmlname='projectid', $maxlength=16, $option_only=0, $show_empty=1, $discard_closed=0, $forcefocus=0, $disabled=0, $mode = 0, $filterkey = '', $nooutput=0, $forceaddid=0, $morecss='', $htmlid='') function select_projects($socid=-1, $selected='', $htmlname='projectid', $maxlength=16, $option_only=0, $show_empty=1, $discard_closed=0, $forcefocus=0, $disabled=0, $mode = 0, $filterkey = '', $nooutput=0, $forceaddid=0, $morecss='', $htmlid='')
{ {
global $langs,$conf,$form; global $langs,$conf,$form;
@ -131,6 +132,7 @@ class FormProjets
* @param string $morecss More CSS * @param string $morecss More CSS
* @return int Nb of project if OK, <0 if KO * @return int Nb of project if OK, <0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_projects_list($socid=-1, $selected='', $htmlname='projectid', $maxlength=24, $option_only=0, $show_empty=1, $discard_closed=0, $forcefocus=0, $disabled=0, $mode=0, $filterkey = '', $nooutput=0, $forceaddid=0, $htmlid='', $morecss='maxwidth500') function select_projects_list($socid=-1, $selected='', $htmlname='projectid', $maxlength=24, $option_only=0, $show_empty=1, $discard_closed=0, $forcefocus=0, $disabled=0, $mode=0, $filterkey = '', $nooutput=0, $forceaddid=0, $htmlid='', $morecss='maxwidth500')
{ {
global $user,$conf,$langs; global $user,$conf,$langs;
@ -471,6 +473,7 @@ class FormProjets
* @param string $projectkey Equivalent key to fk_projet for actual table_element * @param string $projectkey Equivalent key to fk_projet for actual table_element
* @return int|string The HTML select list of element or '' if nothing or -1 if KO * @return int|string The HTML select list of element or '' if nothing or -1 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_element($table_element, $socid=0, $morecss='', $limitonstatus=-2,$projectkey="fk_projet") function select_element($table_element, $socid=0, $morecss='', $limitonstatus=-2,$projectkey="fk_projet")
{ {
global $conf, $langs; global $conf, $langs;
@ -481,7 +484,7 @@ class FormProjets
if (! in_array($table_element, array('don','expensereport_det','expensereport','loan','stock_mouvement','chargesociales'))) $linkedtothirdparty=true; if (! in_array($table_element, array('don','expensereport_det','expensereport','loan','stock_mouvement','chargesociales'))) $linkedtothirdparty=true;
$sqlfilter=''; $sqlfilter='';
//print $table_element; //print $table_element;
switch ($table_element) switch ($table_element)
{ {

View File

@ -59,10 +59,10 @@ class FormPropal
$prefix=''; $prefix='';
$listofstatus=array(); $listofstatus=array();
if ($mode == 'supplier') if ($mode == 'supplier')
{ {
$prefix='SupplierProposalStatus'; $prefix='SupplierProposalStatus';
$langs->load("supplier_proposal"); $langs->load("supplier_proposal");
$listofstatus=array( $listofstatus=array(
0=>array('id'=>0, 'code'=>'PR_DRAFT'), 0=>array('id'=>0, 'code'=>'PR_DRAFT'),
@ -75,7 +75,7 @@ class FormPropal
else else
{ {
$prefix="PropalStatus"; $prefix="PropalStatus";
$sql = "SELECT id, code, label, active FROM ".MAIN_DB_PREFIX."c_propalst"; $sql = "SELECT id, code, label, active FROM ".MAIN_DB_PREFIX."c_propalst";
$sql .= " WHERE active = 1"; $sql .= " WHERE active = 1";
dol_syslog(get_class($this)."::selectProposalStatus", LOG_DEBUG); dol_syslog(get_class($this)."::selectProposalStatus", LOG_DEBUG);
@ -139,4 +139,3 @@ class FormPropal
print '</select>'; print '</select>';
} }
} }

View File

@ -89,6 +89,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
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function show_form($morecss='titlefield', $showform=1) function show_form($morecss='titlefield', $showform=1)
{ {
global $conf, $langs, $user, $form; global $conf, $langs, $user, $form;
@ -356,4 +357,3 @@ function limitChars(textarea, limit, infodiv)
} }
} }

View File

@ -53,6 +53,7 @@ class FormSocialContrib
* @param string $morecss Add more CSS on select * @param string $morecss Add more CSS on select
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_type_socialcontrib($selected='',$htmlname='actioncode', $useempty=0, $maxlen=40, $help=1, $morecss='minwidth300') function select_type_socialcontrib($selected='',$htmlname='actioncode', $useempty=0, $maxlen=40, $help=1, $morecss='minwidth300')
{ {
global $conf,$db,$langs,$user,$mysoc; global $conf,$db,$langs,$user,$mysoc;
@ -115,4 +116,3 @@ class FormSocialContrib
} }
} }

View File

@ -56,6 +56,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.
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function run_triggers($action,$object,$user,$langs,$conf) function run_triggers($action,$object,$user,$langs,$conf)
{ {
// Check parameters // Check parameters

View File

@ -147,6 +147,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
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function connect_bind() function connect_bind()
{ {
global $langs, $conf; global $langs, $conf;
@ -650,6 +651,7 @@ class Ldap
* @param array $info Attributes array * @param array $info Attributes array
* @return string Content of file * @return string Content of file
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function dump_content($dn, $info) function dump_content($dn, $info)
{ {
$content=''; $content='';
@ -1429,6 +1431,7 @@ class Ldap
* @param string $value AD time to convert * @param string $value AD time to convert
* @return integer Unix timestamp * @return integer Unix timestamp
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function convert_time($value) function convert_time($value)
{ {
$dateLargeInt=$value; // nano secondes depuis 1601 !!!! $dateLargeInt=$value; // nano secondes depuis 1601 !!!!

View File

@ -73,7 +73,7 @@ class Menu
/** /**
* Insert a menu entry into this->liste * Insert a menu entry into this->liste
* *
* @param int $idafter Array key after which inserting new entry * @param int $idafter Array key after which inserting new entry
* @param string $url Url to follow on click * @param string $url Url to follow on click
* @param string $titre Label of menu to add * @param string $titre Label of menu to add
* @param integer $level Level of menu to add * @param integer $level Level of menu to add
@ -101,9 +101,12 @@ class Menu
* *
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function remove_last() function remove_last()
{ {
if (count($this->liste) > 1) array_pop($this->liste); if (count($this->liste) > 1) {
array_pop($this->liste);
}
} }
/** /**

View File

@ -51,6 +51,7 @@ class SimpleOpenID
* @param string $a Server * @param string $a Server
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetOpenIDServer($a) function SetOpenIDServer($a)
{ {
$this->URLs['openid_server'] = $a; $this->URLs['openid_server'] = $a;
@ -62,6 +63,7 @@ class SimpleOpenID
* @param string $a Server * @param string $a Server
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetTrustRoot($a) function SetTrustRoot($a)
{ {
$this->URLs['trust_root'] = $a; $this->URLs['trust_root'] = $a;
@ -73,6 +75,7 @@ class SimpleOpenID
* @param string $a Server * @param string $a Server
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetCancelURL($a) function SetCancelURL($a)
{ {
$this->URLs['cancel'] = $a; $this->URLs['cancel'] = $a;
@ -84,6 +87,7 @@ class SimpleOpenID
* @param string $a Server * @param string $a Server
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetApprovedURL($a) function SetApprovedURL($a)
{ {
$this->URLs['approved'] = $a; $this->URLs['approved'] = $a;
@ -95,11 +99,12 @@ class SimpleOpenID
* @param string $a Server * @param string $a Server
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetRequiredFields($a) function SetRequiredFields($a)
{ {
if (is_array($a)){ if (is_array($a)) {
$this->fields['required'] = $a; $this->fields['required'] = $a;
}else{ } else {
$this->fields['required'][] = $a; $this->fields['required'][] = $a;
} }
} }
@ -110,11 +115,12 @@ class SimpleOpenID
* @param string $a Server * @param string $a Server
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetOptionalFields($a) function SetOptionalFields($a)
{ {
if (is_array($a)){ if (is_array($a)) {
$this->fields['optional'] = $a; $this->fields['optional'] = $a;
}else{ } else {
$this->fields['optional'][] = $a; $this->fields['optional'][] = $a;
} }
} }
@ -122,13 +128,14 @@ class SimpleOpenID
/** /**
* SetIdentity * SetIdentity
* *
* @param string $a Server * @param string $a Server
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetIdentity($a) function SetIdentity($a)
{ // Set Identity URL { // Set Identity URL
if ((stripos($a, 'http://') === false) if ((stripos($a, 'http://') === false)
&& (stripos($a, 'https://') === false)){ && (stripos($a, 'https://') === false)) {
$a = 'http://'.$a; $a = 'http://'.$a;
} }
/* /*
@ -152,8 +159,9 @@ class SimpleOpenID
* *
* @return string * @return string
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function GetIdentity() function GetIdentity()
{ // Get Identity {
return $this->openid_url_identity; return $this->openid_url_identity;
} }
@ -162,6 +170,7 @@ class SimpleOpenID
* *
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function GetError() function GetError()
{ {
$e = $this->error; $e = $this->error;
@ -175,6 +184,7 @@ class SimpleOpenID
* @param string $desc Description * @param string $desc Description
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function ErrorStore($code, $desc = null) function ErrorStore($code, $desc = null)
{ {
$errs['OPENID_NOSERVERSFOUND'] = 'Cannot find OpenID Server TAG on Identity page.'; $errs['OPENID_NOSERVERSFOUND'] = 'Cannot find OpenID Server TAG on Identity page.';
@ -189,6 +199,7 @@ class SimpleOpenID
* *
* @return boolean * @return boolean
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function IsError() function IsError()
{ {
if (count($this->error) > 0) if (count($this->error) > 0)
@ -227,6 +238,7 @@ class SimpleOpenID
* @param string $openid_identity Server * @param string $openid_identity Server
* @return string * @return string
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function OpenID_Standarize($openid_identity = null) function OpenID_Standarize($openid_identity = null)
{ {
if ($openid_identity === null) if ($openid_identity === null)
@ -273,6 +285,7 @@ class SimpleOpenID
* @param string $params Params * @param string $params Params
* @return boolean|unknown * @return boolean|unknown
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function FSOCK_Request($url, $method="GET", $params = "") function FSOCK_Request($url, $method="GET", $params = "")
{ {
$fp = fsockopen("ssl://www.myopenid.com", 443, $errno, $errstr, 3); // Connection timeout is 3 seconds $fp = fsockopen("ssl://www.myopenid.com", 443, $errno, $errstr, 3); // Connection timeout is 3 seconds
@ -305,6 +318,7 @@ class SimpleOpenID
* @param string $params Params * @param string $params Params
* @return string * @return string
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function CURL_Request($url, $method="GET", $params = "") function CURL_Request($url, $method="GET", $params = "")
{ // Remember, SSL MUST BE SUPPORTED { // Remember, SSL MUST BE SUPPORTED
if (is_array($params)) $params = $this->array2url($params); if (is_array($params)) $params = $this->array2url($params);
@ -333,6 +347,7 @@ class SimpleOpenID
* @param string $content Content * @param string $content Content
* @return array Array of servers * @return array Array of servers
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function HTML2OpenIDServer($content) function HTML2OpenIDServer($content)
{ {
$get = array(); $get = array();
@ -359,6 +374,7 @@ class SimpleOpenID
* @param string $url Url to found endpoint * @param string $url Url to found endpoint
* @return string Endpoint * @return string Endpoint
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function GetOpenIDServer($url='') function GetOpenIDServer($url='')
{ {
global $conf; global $conf;
@ -369,12 +385,12 @@ class SimpleOpenID
$response = getURLContent($url); $response = getURLContent($url);
list($servers, $delegates) = $this->HTML2OpenIDServer($response); list($servers, $delegates) = $this->HTML2OpenIDServer($response);
if (count($servers) == 0){ if (count($servers) == 0) {
$this->ErrorStore('OPENID_NOSERVERSFOUND'); $this->ErrorStore('OPENID_NOSERVERSFOUND');
return false; return false;
} }
if (isset($delegates[0]) if (isset($delegates[0])
&& ($delegates[0] != "")){ && ($delegates[0] != "")) {
$this->SetIdentity($delegates[0]); $this->SetIdentity($delegates[0]);
} }
$this->SetOpenIDServer($servers[0]); $this->SetOpenIDServer($servers[0]);
@ -386,6 +402,7 @@ class SimpleOpenID
* *
* @return string * @return string
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function GetRedirectURL() function GetRedirectURL()
{ {
$params = array(); $params = array();
@ -410,6 +427,7 @@ class SimpleOpenID
* *
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function Redirect() function Redirect()
{ {
$redirect_to = $this->GetRedirectURL(); $redirect_to = $this->GetRedirectURL();
@ -430,6 +448,7 @@ class SimpleOpenID
* *
* @return boolean * @return boolean
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function ValidateWithServer() function ValidateWithServer()
{ {
$params = array( $params = array(
@ -522,4 +541,3 @@ class SimpleOpenID
} }
} }

View File

@ -462,6 +462,7 @@ class RssParser
* @param array $attrs Attributes of tags * @param array $attrs Attributes of tags
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function feed_start_element($p, $element, &$attrs) function feed_start_element($p, $element, &$attrs)
{ {
$el = $element = strtolower($element); $el = $element = strtolower($element);
@ -581,6 +582,7 @@ class RssParser
* @param string $text Tag * @param string $text Tag
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function feed_cdata($p, $text) function feed_cdata($p, $text)
{ {
if ($this->_format == 'atom' and $this->incontent) if ($this->_format == 'atom' and $this->incontent)
@ -601,6 +603,7 @@ class RssParser
* @param string $el Tag * @param string $el Tag
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function feed_end_element($p, $el) function feed_end_element($p, $el)
{ {
$el = strtolower($el); $el = strtolower($el);
@ -669,6 +672,7 @@ class RssParser
* @param string $text Text * @param string $text Text
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function append_content($text) function append_content($text)
{ {
if ( $this->initem ) { if ( $this->initem ) {
@ -781,4 +785,3 @@ function xml2php($xml)
return $array; return $array;
} }

View File

@ -349,6 +349,7 @@ class SMTPs
* *
* @return mixed $_retVal Boolean indicating success or failure on connection * @return mixed $_retVal Boolean indicating success or failure on connection
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _server_connect() function _server_connect()
{ {
// Default return value // Default return value
@ -411,6 +412,7 @@ class SMTPs
* *
* @return boolean|null $_retVal Boolean indicating success or failure of authentication * @return boolean|null $_retVal Boolean indicating success or failure of authentication
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _server_authenticate() function _server_authenticate()
{ {
global $conf; global $conf;
@ -1052,6 +1054,7 @@ class SMTPs
* @param string $_strAddr Email address * @param string $_strAddr Email address
* @return array An array of the various parts of an email address * @return array An array of the various parts of an email address
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _strip_email($_strAddr) function _strip_email($_strAddr)
{ {
// Keep the orginal // Keep the orginal
@ -1094,6 +1097,7 @@ class SMTPs
* *
* @return array Returns an array of bares addresses * @return array Returns an array of bares addresses
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_RCPT_list() function get_RCPT_list()
{ {
/** /**
@ -1123,6 +1127,7 @@ class SMTPs
* @param string $_which Which collection of addresses to return ('to', 'cc', 'bcc') * @param string $_which Which collection of addresses to return ('to', 'cc', 'bcc')
* @return string|false Array of emaill address * @return string|false Array of emaill address
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_email_list($_which = null) function get_email_list($_which = null)
{ {
// We need to know which address segment to pull // We need to know which address segment to pull
@ -1754,6 +1759,7 @@ class SMTPs
* @param string $response Response. Example: "550 5.7.1 https://support.google.com/a/answer/6140680#invalidcred j21sm814390wre.3" * @param string $response Response. Example: "550 5.7.1 https://support.google.com/a/answer/6140680#invalidcred j21sm814390wre.3"
* @return boolean True or false * @return boolean True or false
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function server_parse($socket, $response) function server_parse($socket, $response)
{ {
/** /**
@ -1795,6 +1801,7 @@ class SMTPs
* @param string $CRLF CRLF * @param string $CRLF CRLF
* @return boolean|null True or false * @return boolean|null True or false
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function socket_send_str( $_strSend, $_returnCode = null, $CRLF = "\r\n" ) function socket_send_str( $_strSend, $_returnCode = null, $CRLF = "\r\n" )
{ {
if ($this->_debug) $this->log.=$_strSend; // @CHANGE LDR for log if ($this->_debug) $this->log.=$_strSend; // @CHANGE LDR for log
@ -2049,4 +2056,3 @@ class SMTPs
* - basic shell with some commets * - basic shell with some commets
* *
*/ */

View File

@ -764,6 +764,7 @@ class Translate
* @param int $usecode 1=Show code instead of country name for language variant, 2=Show only code * @param int $usecode 1=Show code instead of country name for language variant, 2=Show only code
* @return array List of languages * @return array List of languages
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_available_languages($langdir=DOL_DOCUMENT_ROOT,$maxlength=0,$usecode=0) function get_available_languages($langdir=DOL_DOCUMENT_ROOT,$maxlength=0,$usecode=0)
{ {
global $conf; global $conf;
@ -802,6 +803,7 @@ class Translate
* @param integer $searchalt Search also alernate language file * @param integer $searchalt Search also alernate language file
* @return boolean true if exists and readable * @return boolean true if exists and readable
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function file_exists($filename,$searchalt=0) function file_exists($filename,$searchalt=0)
{ {
// Test si fichier dans repertoire de la langue // Test si fichier dans repertoire de la langue
@ -1024,6 +1026,7 @@ class Translate
* *
* @return array Array of translation keys lang_key => string_translation_loaded * @return array Array of translation keys lang_key => string_translation_loaded
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_translations_for_substitutions() function get_translations_for_substitutions()
{ {
$substitutionarray = array(); $substitutionarray = array();

View File

@ -41,6 +41,7 @@ interface Database
* @param resource $resultset Resultset of request * @param resource $resultset Resultset of request
* @return array Array * @return array Array
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_row($resultset); function fetch_row($resultset);
/** /**
@ -77,6 +78,7 @@ interface Database
* @param string $owner Username of database owner * @param string $owner Username of database owner
* @return resource resource defined if OK, null if KO * @return resource resource defined if OK, null if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLCreateDb($database, $charset = '', $collation = '', $owner = ''); function DDLCreateDb($database, $charset = '', $collation = '', $owner = '');
/** /**
@ -102,6 +104,7 @@ interface Database
* @return int Nombre de lignes * @return int Nombre de lignes
* @see num_rows * @see num_rows
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function affected_rows($resultset); function affected_rows($resultset);
/** /**
@ -118,6 +121,7 @@ interface Database
* @param string $table Nmae of table filter ('xxx%') * @param string $table Nmae of table filter ('xxx%')
* @return array List of tables in an array * @return array List of tables in an array
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLListTables($database, $table = ''); function DDLListTables($database, $table = '');
/** /**
@ -150,6 +154,7 @@ interface Database
* @param resource $resultset Resultset of request * @param resource $resultset Resultset of request
* @return array Array * @return array Array
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_array($resultset); function fetch_array($resultset);
/** /**
@ -174,6 +179,7 @@ interface Database
* @param string $fieldid Field name * @param string $fieldid Field name
* @return int Id of row * @return int Id of row
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function last_insert_id($tab, $fieldid = 'rowid'); function last_insert_id($tab, $fieldid = 'rowid');
/** /**
@ -254,6 +260,7 @@ interface Database
* @return int Nb of lines * @return int Nb of lines
* @see affected_rows * @see affected_rows
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function num_rows($resultset); function num_rows($resultset);
/** /**
@ -289,6 +296,7 @@ interface Database
* @param array $keys Tableau des champs cles noms => valeur * @param array $keys Tableau des champs cles noms => valeur
* @return int <0 if KO, >=0 if OK * @return int <0 if KO, >=0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLCreateTable($table, $fields, $primary_key, $type, $unique_keys = null, $fulltext_keys = null, $keys = null); function DDLCreateTable($table, $fields, $primary_key, $type, $unique_keys = null, $fulltext_keys = null, $keys = null);
/** /**
@ -297,6 +305,7 @@ interface Database
* @param string $table Name of table * @param string $table Name of table
* @return int <0 if KO, >=0 if OK * @return int <0 if KO, >=0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLDropTable($table); function DDLDropTable($table);
/** /**
@ -315,6 +324,7 @@ interface Database
* @param string $field_position Optionnel ex.: "after champtruc" * @param string $field_position Optionnel ex.: "after champtruc"
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLAddField($table, $field_name, $field_desc, $field_position = ""); function DDLAddField($table, $field_name, $field_desc, $field_position = "");
/** /**
@ -324,6 +334,7 @@ interface Database
* @param string $field_name Name of field to drop * @param string $field_name Name of field to drop
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLDropField($table, $field_name); function DDLDropField($table, $field_name);
/** /**
@ -334,6 +345,7 @@ interface Database
* @param string $field_desc Array with description of field format * @param string $field_desc Array with description of field format
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLUpdateField($table, $field_name, $field_desc); function DDLUpdateField($table, $field_name, $field_desc);
/** /**
@ -350,6 +362,7 @@ interface Database
* @param string $field Optionnel : Name of field if we want description of field * @param string $field Optionnel : Name of field if we want description of field
* @return resource Resource * @return resource Resource
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLDescTable($table, $field = ""); function DDLDescTable($table, $field = "");
/** /**
@ -375,6 +388,7 @@ interface Database
* @param string $dolibarr_main_db_name Database name where user must be granted * @param string $dolibarr_main_db_name Database name where user must be granted
* @return int <0 if KO, >=0 if OK * @return int <0 if KO, >=0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLCreateUser( function DDLCreateUser(
$dolibarr_main_db_host, $dolibarr_main_db_host,
$dolibarr_main_db_user, $dolibarr_main_db_user,
@ -417,6 +431,7 @@ interface Database
* @param string $table Name of table * @param string $table Name of table
* @return array Array with inforation on table * @return array Array with inforation on table
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLInfoTable($table); function DDLInfoTable($table);
/** /**
@ -447,6 +462,7 @@ interface Database
* *
* @return string Id connexion * @return string Id connexion
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLGetConnectId(); function DDLGetConnectId();
/** /**
@ -455,6 +471,7 @@ interface Database
* @param resource $resultset Curseur de la requete voulue * @param resource $resultset Curseur de la requete voulue
* @return Object Object result line or false if KO or end of cursor * @return Object Object result line or false if KO or end of cursor
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_object($resultset); function fetch_object($resultset);
/** /**
@ -463,6 +480,7 @@ interface Database
* @param string $database Name of database * @param string $database Name of database
* @return boolean true if OK, false if KO * @return boolean true if OK, false if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_db($database); function select_db($database);
} }

View File

@ -145,6 +145,7 @@ class DoliDBMssql extends DoliDB
* @param string $database Name of database * @param string $database Name of database
* @return boolean true if OK, false if KO * @return boolean true if OK, false if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_db($database) function select_db($database)
{ {
return @mssql_select_db($database, $this->db); return @mssql_select_db($database, $this->db);
@ -465,6 +466,7 @@ class DoliDBMssql extends DoliDB
* @param resource $resultset Curseur de la requete voulue * @param resource $resultset Curseur de la requete voulue
* @return object|false Object result line or false if KO or end of cursor * @return object|false Object result line or false if KO or end of cursor
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_object($resultset) function fetch_object($resultset)
{ {
// Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion // Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion
@ -478,6 +480,7 @@ class DoliDBMssql extends DoliDB
* @param resource $resultset Resultset of request * @param resource $resultset Resultset of request
* @return array|false Array or false if KO or end of cursor * @return array|false Array or false if KO or end of cursor
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_array($resultset) function fetch_array($resultset)
{ {
// Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion // Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion
@ -492,6 +495,7 @@ class DoliDBMssql extends DoliDB
* @param resource $resultset Resultset of request * @param resource $resultset Resultset of request
* @return array|false Array or false if KO or end of cursor * @return array|false Array or false if KO or end of cursor
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_row($resultset) function fetch_row($resultset)
{ {
// Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion // Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion
@ -506,6 +510,7 @@ class DoliDBMssql extends DoliDB
* @return int Nb of lines * @return int Nb of lines
* @see affected_rows * @see affected_rows
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function num_rows($resultset) function num_rows($resultset)
{ {
// Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion // Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion
@ -520,6 +525,7 @@ class DoliDBMssql extends DoliDB
* @return int Nombre de lignes * @return int Nombre de lignes
* @see num_rows * @see num_rows
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function affected_rows($resultset) function affected_rows($resultset)
{ {
// Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion // Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion
@ -646,6 +652,7 @@ class DoliDBMssql extends DoliDB
* @param string $fieldid Field name * @param string $fieldid Field name
* @return int Id of row or -1 on error * @return int Id of row or -1 on error
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function last_insert_id($tab,$fieldid='rowid') function last_insert_id($tab,$fieldid='rowid')
{ {
$res = $this->query("SELECT @@IDENTITY as id"); $res = $this->query("SELECT @@IDENTITY as id");
@ -707,6 +714,7 @@ class DoliDBMssql extends DoliDB
* *
* @return string Id connexion * @return string Id connexion
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLGetConnectId() function DDLGetConnectId()
{ {
$resql=$this->query('SELECT CONNECTION_ID()'); $resql=$this->query('SELECT CONNECTION_ID()');
@ -729,6 +737,7 @@ class DoliDBMssql extends DoliDB
* @param string $owner Username of database owner * @param string $owner Username of database owner
* @return false|resource|true resource defined if OK, false if KO * @return false|resource|true resource defined if OK, false if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLCreateDb($database,$charset='',$collation='',$owner='') function DDLCreateDb($database,$charset='',$collation='',$owner='')
{ {
/*if (empty($charset)) $charset=$this->forcecharset; /*if (empty($charset)) $charset=$this->forcecharset;
@ -761,6 +770,7 @@ class DoliDBMssql extends DoliDB
* @param string $table Nmae of table filter ('xxx%') * @param string $table Nmae of table filter ('xxx%')
* @return array List of tables in an array * @return array List of tables in an array
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLListTables($database,$table='') function DDLListTables($database,$table='')
{ {
$this->_results = mssql_list_tables($database, $this->db); $this->_results = mssql_list_tables($database, $this->db);
@ -773,6 +783,7 @@ class DoliDBMssql extends DoliDB
* @param string $table Name of table * @param string $table Name of table
* @return array Tableau des informations des champs de la table * @return array Tableau des informations des champs de la table
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLInfoTable($table) function DDLInfoTable($table)
{ {
@ -796,6 +807,7 @@ class DoliDBMssql extends DoliDB
* @param array $keys Tableau des champs cles noms => valeur * @param array $keys Tableau des champs cles noms => valeur
* @return int <0 if KO, >=0 if OK * @return int <0 if KO, >=0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLCreateTable($table,$fields,$primary_key,$type,$unique_keys=null,$fulltext_keys=null,$keys=null) function DDLCreateTable($table,$fields,$primary_key,$type,$unique_keys=null,$fulltext_keys=null,$keys=null)
{ {
// FIXME: $fulltext_keys parameter is unused // FIXME: $fulltext_keys parameter is unused
@ -869,6 +881,7 @@ class DoliDBMssql extends DoliDB
* @param string $table Name of table * @param string $table Name of table
* @return int <0 if KO, >=0 if OK * @return int <0 if KO, >=0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLDropTable($table) function DDLDropTable($table)
{ {
$sql = "DROP TABLE ".$table; $sql = "DROP TABLE ".$table;
@ -886,6 +899,7 @@ class DoliDBMssql extends DoliDB
* @param string $field Optionnel : Name of field if we want description of field * @param string $field Optionnel : Name of field if we want description of field
* @return false|resource|true Resource * @return false|resource|true Resource
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLDescTable($table,$field="") function DDLDescTable($table,$field="")
{ {
$sql="DESC ".$table." ".$field; $sql="DESC ".$table." ".$field;
@ -904,6 +918,7 @@ class DoliDBMssql extends DoliDB
* @param string $field_position Optionnel ex.: "after champtruc" * @param string $field_position Optionnel ex.: "after champtruc"
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLAddField($table,$field_name,$field_desc,$field_position="") function DDLAddField($table,$field_name,$field_desc,$field_position="")
{ {
// cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra // cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra
@ -939,6 +954,7 @@ class DoliDBMssql extends DoliDB
* @param string $field_desc Array with description of field format * @param string $field_desc Array with description of field format
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLUpdateField($table,$field_name,$field_desc) function DDLUpdateField($table,$field_name,$field_desc)
{ {
$sql = "ALTER TABLE ".$table; $sql = "ALTER TABLE ".$table;
@ -961,6 +977,7 @@ class DoliDBMssql extends DoliDB
* @param string $field_name Name of field to drop * @param string $field_name Name of field to drop
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLDropField($table,$field_name) function DDLDropField($table,$field_name)
{ {
$sql= "ALTER TABLE ".$table." DROP COLUMN `".$field_name."`"; $sql= "ALTER TABLE ".$table." DROP COLUMN `".$field_name."`";
@ -982,6 +999,7 @@ class DoliDBMssql extends DoliDB
* @param string $dolibarr_main_db_name Database name where user must be granted * @param string $dolibarr_main_db_name Database name where user must be granted
* @return int <0 if KO, >=0 if OK * @return int <0 if KO, >=0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLCreateUser($dolibarr_main_db_host,$dolibarr_main_db_user,$dolibarr_main_db_pass,$dolibarr_main_db_name) function DDLCreateUser($dolibarr_main_db_host,$dolibarr_main_db_user,$dolibarr_main_db_pass,$dolibarr_main_db_name)
{ {
$sql = "CREATE LOGIN ".$this->EscapeFieldName($dolibarr_main_db_user)." WITH PASSWORD='$dolibarr_main_db_pass'"; $sql = "CREATE LOGIN ".$this->EscapeFieldName($dolibarr_main_db_user)." WITH PASSWORD='$dolibarr_main_db_pass'";
@ -1138,6 +1156,7 @@ class DoliDBMssql extends DoliDB
* @param string $fieldname Field's name to escape * @param string $fieldname Field's name to escape
* @return string field's name escaped * @return string field's name escaped
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function EscapeFieldName($fieldname) { function EscapeFieldName($fieldname) {
return "[".$fieldname."]"; return "[".$fieldname."]";
} }
@ -1150,6 +1169,7 @@ class DoliDBMssql extends DoliDB
* @param mixed $fields String for one field or array of string for multiple field * @param mixed $fields String for one field or array of string for multiple field
* @return false|object * @return false|object
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function GetFieldInformation($table,$fields) { function GetFieldInformation($table,$fields) {
$sql="SELECT * from INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='".$this->escape($table)."' AND COLUMN_NAME"; $sql="SELECT * from INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='".$this->escape($table)."' AND COLUMN_NAME";
if (is_array($fields)) if (is_array($fields))
@ -1176,4 +1196,3 @@ class DoliDBMssql extends DoliDB
} }
} }

View File

@ -173,6 +173,7 @@ class DoliDBMysqli extends DoliDB
* @param string $database Name of database * @param string $database Name of database
* @return boolean true if OK, false if KO * @return boolean true if OK, false if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_db($database) function select_db($database)
{ {
dol_syslog(get_class($this)."::select_db database=".$database, LOG_DEBUG); dol_syslog(get_class($this)."::select_db database=".$database, LOG_DEBUG);
@ -291,6 +292,7 @@ class DoliDBMysqli extends DoliDB
* @param mysqli_result $resultset Curseur de la requete voulue * @param mysqli_result $resultset Curseur de la requete voulue
* @return object|null Object result line or null if KO or end of cursor * @return object|null Object result line or null if KO or end of cursor
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_object($resultset) function fetch_object($resultset)
{ {
// Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion // Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion
@ -305,6 +307,7 @@ class DoliDBMysqli extends DoliDB
* @param mysqli_result $resultset Resultset of request * @param mysqli_result $resultset Resultset of request
* @return array|null Array or null if KO or end of cursor * @return array|null Array or null if KO or end of cursor
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_array($resultset) function fetch_array($resultset)
{ {
// If resultset not provided, we take the last used by connexion // If resultset not provided, we take the last used by connexion
@ -318,6 +321,7 @@ class DoliDBMysqli extends DoliDB
* @param mysqli_result $resultset Resultset of request * @param mysqli_result $resultset Resultset of request
* @return array|null|0 Array or null if KO or end of cursor or 0 if resultset is bool * @return array|null|0 Array or null if KO or end of cursor or 0 if resultset is bool
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_row($resultset) function fetch_row($resultset)
{ {
// If resultset not provided, we take the last used by connexion // If resultset not provided, we take the last used by connexion
@ -340,6 +344,7 @@ class DoliDBMysqli extends DoliDB
* @return int Nb of lines * @return int Nb of lines
* @see affected_rows * @see affected_rows
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function num_rows($resultset) function num_rows($resultset)
{ {
// If resultset not provided, we take the last used by connexion // If resultset not provided, we take the last used by connexion
@ -354,6 +359,7 @@ class DoliDBMysqli extends DoliDB
* @return int Nombre de lignes * @return int Nombre de lignes
* @see num_rows * @see num_rows
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function affected_rows($resultset) function affected_rows($resultset)
{ {
// If resultset not provided, we take the last used by connexion // If resultset not provided, we take the last used by connexion
@ -463,6 +469,7 @@ class DoliDBMysqli extends DoliDB
* @param string $fieldid Field name * @param string $fieldid Field name
* @return int|string Id of row * @return int|string Id of row
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function last_insert_id($tab,$fieldid='rowid') function last_insert_id($tab,$fieldid='rowid')
{ {
return $this->db->insert_id; return $this->db->insert_id;
@ -543,6 +550,7 @@ class DoliDBMysqli extends DoliDB
* *
* @return string Id connexion * @return string Id connexion
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLGetConnectId() function DDLGetConnectId()
{ {
$resql=$this->query('SELECT CONNECTION_ID()'); $resql=$this->query('SELECT CONNECTION_ID()');
@ -565,6 +573,7 @@ class DoliDBMysqli extends DoliDB
* @param string $owner Username of database owner * @param string $owner Username of database owner
* @return bool|mysqli_result resource defined if OK, null if KO * @return bool|mysqli_result resource defined if OK, null if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLCreateDb($database,$charset='',$collation='',$owner='') function DDLCreateDb($database,$charset='',$collation='',$owner='')
{ {
if (empty($charset)) $charset=$this->forcecharset; if (empty($charset)) $charset=$this->forcecharset;
@ -593,6 +602,7 @@ class DoliDBMysqli extends DoliDB
* @param string $table Nmae of table filter ('xxx%') * @param string $table Nmae of table filter ('xxx%')
* @return array List of tables in an array * @return array List of tables in an array
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLListTables($database, $table='') function DDLListTables($database, $table='')
{ {
$listtables=array(); $listtables=array();
@ -618,6 +628,7 @@ class DoliDBMysqli extends DoliDB
* @param string $table Name of table * @param string $table Name of table
* @return array Tableau des informations des champs de la table * @return array Tableau des informations des champs de la table
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLInfoTable($table) function DDLInfoTable($table)
{ {
$infotables=array(); $infotables=array();
@ -648,6 +659,7 @@ class DoliDBMysqli extends DoliDB
* @param array $keys Tableau des champs cles noms => valeur * @param array $keys Tableau des champs cles noms => valeur
* @return int <0 if KO, >=0 if OK * @return int <0 if KO, >=0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLCreateTable($table,$fields,$primary_key,$type,$unique_keys=null,$fulltext_keys=null,$keys=null) function DDLCreateTable($table,$fields,$primary_key,$type,$unique_keys=null,$fulltext_keys=null,$keys=null)
{ {
// FIXME: $fulltext_keys parameter is unused // FIXME: $fulltext_keys parameter is unused
@ -724,6 +736,7 @@ class DoliDBMysqli extends DoliDB
* @param string $table Name of table * @param string $table Name of table
* @return int <0 if KO, >=0 if OK * @return int <0 if KO, >=0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLDropTable($table) function DDLDropTable($table)
{ {
$sql = "DROP TABLE ".$table; $sql = "DROP TABLE ".$table;
@ -741,6 +754,7 @@ class DoliDBMysqli extends DoliDB
* @param string $field Optionnel : Name of field if we want description of field * @param string $field Optionnel : Name of field if we want description of field
* @return bool|mysqli_result Resultset x (x->Field, x->Type, ...) * @return bool|mysqli_result Resultset x (x->Field, x->Type, ...)
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLDescTable($table,$field="") function DDLDescTable($table,$field="")
{ {
$sql="DESC ".$table." ".$field; $sql="DESC ".$table." ".$field;
@ -759,6 +773,7 @@ class DoliDBMysqli extends DoliDB
* @param string $field_position Optionnel ex.: "after champtruc" * @param string $field_position Optionnel ex.: "after champtruc"
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLAddField($table,$field_name,$field_desc,$field_position="") function DDLAddField($table,$field_name,$field_desc,$field_position="")
{ {
// cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra // cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra
@ -808,6 +823,7 @@ class DoliDBMysqli extends DoliDB
* @param string $field_desc Array with description of field format * @param string $field_desc Array with description of field format
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLUpdateField($table,$field_name,$field_desc) function DDLUpdateField($table,$field_name,$field_desc)
{ {
$sql = "ALTER TABLE ".$table; $sql = "ALTER TABLE ".$table;
@ -852,6 +868,7 @@ class DoliDBMysqli extends DoliDB
* @param string $field_name Name of field to drop * @param string $field_name Name of field to drop
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLDropField($table,$field_name) function DDLDropField($table,$field_name)
{ {
$sql= "ALTER TABLE ".$table." DROP COLUMN `".$field_name."`"; $sql= "ALTER TABLE ".$table." DROP COLUMN `".$field_name."`";
@ -873,6 +890,7 @@ class DoliDBMysqli extends DoliDB
* @param string $dolibarr_main_db_name Database name where user must be granted * @param string $dolibarr_main_db_name Database name where user must be granted
* @return int <0 if KO, >=0 if OK * @return int <0 if KO, >=0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLCreateUser($dolibarr_main_db_host,$dolibarr_main_db_user,$dolibarr_main_db_pass,$dolibarr_main_db_name) function DDLCreateUser($dolibarr_main_db_host,$dolibarr_main_db_user,$dolibarr_main_db_pass,$dolibarr_main_db_name)
{ {
$sql = "CREATE USER '".$this->escape($dolibarr_main_db_user)."'"; $sql = "CREATE USER '".$this->escape($dolibarr_main_db_user)."'";
@ -1082,4 +1100,3 @@ class DoliDBMysqli extends DoliDB
return $result; return $result;
} }
} }

View File

@ -367,6 +367,7 @@ class DoliDBPgsql extends DoliDB
* @param string $database Name of database * @param string $database Name of database
* @return bool true if OK, false if KO * @return bool true if OK, false if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_db($database) function select_db($database)
{ {
if ($database == $this->database_name) return true; if ($database == $this->database_name) return true;
@ -546,6 +547,7 @@ class DoliDBPgsql extends DoliDB
* @param resource $resultset Curseur de la requete voulue * @param resource $resultset Curseur de la requete voulue
* @return false|object Object result line or false if KO or end of cursor * @return false|object Object result line or false if KO or end of cursor
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_object($resultset) function fetch_object($resultset)
{ {
// If resultset not provided, we take the last used by connexion // If resultset not provided, we take the last used by connexion
@ -559,6 +561,7 @@ class DoliDBPgsql extends DoliDB
* @param resource $resultset Resultset of request * @param resource $resultset Resultset of request
* @return false|array Array * @return false|array Array
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_array($resultset) function fetch_array($resultset)
{ {
// If resultset not provided, we take the last used by connexion // If resultset not provided, we take the last used by connexion
@ -572,6 +575,7 @@ class DoliDBPgsql extends DoliDB
* @param resource $resultset Resultset of request * @param resource $resultset Resultset of request
* @return false|array Array * @return false|array Array
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_row($resultset) function fetch_row($resultset)
{ {
// Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion // Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion
@ -586,6 +590,7 @@ class DoliDBPgsql extends DoliDB
* @return int Nb of lines, -1 on error * @return int Nb of lines, -1 on error
* @see affected_rows * @see affected_rows
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function num_rows($resultset) function num_rows($resultset)
{ {
// If resultset not provided, we take the last used by connexion // If resultset not provided, we take the last used by connexion
@ -600,6 +605,7 @@ class DoliDBPgsql extends DoliDB
* @return int Nb of lines * @return int Nb of lines
* @see num_rows * @see num_rows
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function affected_rows($resultset) function affected_rows($resultset)
{ {
// If resultset not provided, we take the last used by connexion // If resultset not provided, we take the last used by connexion
@ -761,6 +767,7 @@ class DoliDBPgsql extends DoliDB
* @param string $fieldid Field name * @param string $fieldid Field name
* @return string Id of row * @return string Id of row
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function last_insert_id($tab,$fieldid='rowid') function last_insert_id($tab,$fieldid='rowid')
{ {
//$result = pg_query($this->db,"SELECT MAX(".$fieldid.") FROM ".$tab); //$result = pg_query($this->db,"SELECT MAX(".$fieldid.") FROM ".$tab);
@ -824,6 +831,7 @@ class DoliDBPgsql extends DoliDB
* *
* @return string Id connexion * @return string Id connexion
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLGetConnectId() function DDLGetConnectId()
{ {
return '?'; return '?';
@ -842,6 +850,7 @@ class DoliDBPgsql extends DoliDB
* @param string $owner Username of database owner * @param string $owner Username of database owner
* @return false|resource resource defined if OK, null if KO * @return false|resource resource defined if OK, null if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLCreateDb($database,$charset='',$collation='',$owner='') function DDLCreateDb($database,$charset='',$collation='',$owner='')
{ {
if (empty($charset)) $charset=$this->forcecharset; if (empty($charset)) $charset=$this->forcecharset;
@ -863,6 +872,7 @@ class DoliDBPgsql extends DoliDB
* @param string $table Name of table filter ('xxx%') * @param string $table Name of table filter ('xxx%')
* @return array List of tables in an array * @return array List of tables in an array
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLListTables($database, $table='') function DDLListTables($database, $table='')
{ {
$listtables=array(); $listtables=array();
@ -887,6 +897,7 @@ class DoliDBPgsql extends DoliDB
* @return array Tableau des informations des champs de la table * @return array Tableau des informations des champs de la table
* *
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLInfoTable($table) function DDLInfoTable($table)
{ {
$infotables=array(); $infotables=array();
@ -932,6 +943,7 @@ class DoliDBPgsql extends DoliDB
* @param array $keys Tableau des champs cles noms => valeur * @param array $keys Tableau des champs cles noms => valeur
* @return int <0 if KO, >=0 if OK * @return int <0 if KO, >=0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLCreateTable($table,$fields,$primary_key,$type,$unique_keys=null,$fulltext_keys=null,$keys=null) function DDLCreateTable($table,$fields,$primary_key,$type,$unique_keys=null,$fulltext_keys=null,$keys=null)
{ {
// FIXME: $fulltext_keys parameter is unused // FIXME: $fulltext_keys parameter is unused
@ -1005,6 +1017,7 @@ class DoliDBPgsql extends DoliDB
* @param string $table Name of table * @param string $table Name of table
* @return int <0 if KO, >=0 if OK * @return int <0 if KO, >=0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLDropTable($table) function DDLDropTable($table)
{ {
$sql = "DROP TABLE ".$table; $sql = "DROP TABLE ".$table;
@ -1024,6 +1037,7 @@ class DoliDBPgsql extends DoliDB
* @param string $dolibarr_main_db_name Database name where user must be granted * @param string $dolibarr_main_db_name Database name where user must be granted
* @return int <0 if KO, >=0 if OK * @return int <0 if KO, >=0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLCreateUser($dolibarr_main_db_host,$dolibarr_main_db_user,$dolibarr_main_db_pass,$dolibarr_main_db_name) function DDLCreateUser($dolibarr_main_db_host,$dolibarr_main_db_user,$dolibarr_main_db_pass,$dolibarr_main_db_name)
{ {
// Note: using ' on user does not works with pgsql // Note: using ' on user does not works with pgsql
@ -1046,6 +1060,7 @@ class DoliDBPgsql extends DoliDB
* @param string $field Optionnel : Name of field if we want description of field * @param string $field Optionnel : Name of field if we want description of field
* @return false|resource Resultset x (x->attname) * @return false|resource Resultset x (x->attname)
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLDescTable($table,$field="") function DDLDescTable($table,$field="")
{ {
$sql ="SELECT attname FROM pg_attribute, pg_type WHERE typname = '".$table."' AND attrelid = typrelid"; $sql ="SELECT attname FROM pg_attribute, pg_type WHERE typname = '".$table."' AND attrelid = typrelid";
@ -1066,6 +1081,7 @@ class DoliDBPgsql extends DoliDB
* @param string $field_position Optionnel ex.: "after champtruc" * @param string $field_position Optionnel ex.: "after champtruc"
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLAddField($table,$field_name,$field_desc,$field_position="") function DDLAddField($table,$field_name,$field_desc,$field_position="")
{ {
// cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra // cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra
@ -1104,6 +1120,7 @@ class DoliDBPgsql extends DoliDB
* @param string $field_desc Array with description of field format * @param string $field_desc Array with description of field format
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLUpdateField($table,$field_name,$field_desc) function DDLUpdateField($table,$field_name,$field_desc)
{ {
$sql = "ALTER TABLE ".$table; $sql = "ALTER TABLE ".$table;
@ -1146,6 +1163,7 @@ class DoliDBPgsql extends DoliDB
* @param string $field_name Name of field to drop * @param string $field_name Name of field to drop
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLDropField($table,$field_name) function DDLDropField($table,$field_name)
{ {
$sql= "ALTER TABLE ".$table." DROP COLUMN ".$field_name; $sql= "ALTER TABLE ".$table." DROP COLUMN ".$field_name;

View File

@ -302,6 +302,7 @@ class DoliDBSqlite3 extends DoliDB
* @param string $database Name of database * @param string $database Name of database
* @return boolean true if OK, false if KO * @return boolean true if OK, false if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_db($database) function select_db($database)
{ {
dol_syslog(get_class($this)."::select_db database=".$database, LOG_DEBUG); dol_syslog(get_class($this)."::select_db database=".$database, LOG_DEBUG);
@ -496,6 +497,7 @@ class DoliDBSqlite3 extends DoliDB
* @param SQLite3Result $resultset Curseur de la requete voulue * @param SQLite3Result $resultset Curseur de la requete voulue
* @return false|object Object result line or false if KO or end of cursor * @return false|object Object result line or false if KO or end of cursor
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_object($resultset) function fetch_object($resultset)
{ {
// Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion // Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion
@ -515,6 +517,7 @@ class DoliDBSqlite3 extends DoliDB
* @param SQLite3Result $resultset Resultset of request * @param SQLite3Result $resultset Resultset of request
* @return false|array Array or false if KO or end of cursor * @return false|array Array or false if KO or end of cursor
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_array($resultset) function fetch_array($resultset)
{ {
// If resultset not provided, we take the last used by connexion // If resultset not provided, we take the last used by connexion
@ -530,6 +533,7 @@ class DoliDBSqlite3 extends DoliDB
* @param SQLite3Result $resultset Resultset of request * @param SQLite3Result $resultset Resultset of request
* @return false|array Array or false if KO or end of cursor * @return false|array Array or false if KO or end of cursor
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_row($resultset) function fetch_row($resultset)
{ {
// If resultset not provided, we take the last used by connexion // If resultset not provided, we take the last used by connexion
@ -552,6 +556,7 @@ class DoliDBSqlite3 extends DoliDB
* @return int Nb of lines * @return int Nb of lines
* @see affected_rows * @see affected_rows
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function num_rows($resultset) function num_rows($resultset)
{ {
// FIXME: SQLite3Result does not have a queryString member // FIXME: SQLite3Result does not have a queryString member
@ -571,6 +576,7 @@ class DoliDBSqlite3 extends DoliDB
* @return int Nb of lines * @return int Nb of lines
* @see affected_rows * @see affected_rows
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function affected_rows($resultset) function affected_rows($resultset)
{ {
// FIXME: SQLite3Result does not have a queryString member // FIXME: SQLite3Result does not have a queryString member
@ -699,6 +705,7 @@ class DoliDBSqlite3 extends DoliDB
* @param string $fieldid Field name * @param string $fieldid Field name
* @return int Id of row * @return int Id of row
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function last_insert_id($tab,$fieldid='rowid') function last_insert_id($tab,$fieldid='rowid')
{ {
return $this->db->lastInsertRowId(); return $this->db->lastInsertRowId();
@ -778,6 +785,7 @@ class DoliDBSqlite3 extends DoliDB
* *
* @return string Id connexion * @return string Id connexion
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLGetConnectId() function DDLGetConnectId()
{ {
return '?'; return '?';
@ -795,6 +803,7 @@ class DoliDBSqlite3 extends DoliDB
* @param string $owner Username of database owner * @param string $owner Username of database owner
* @return SQLite3Result resource defined if OK, null if KO * @return SQLite3Result resource defined if OK, null if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLCreateDb($database,$charset='',$collation='',$owner='') function DDLCreateDb($database,$charset='',$collation='',$owner='')
{ {
if (empty($charset)) $charset=$this->forcecharset; if (empty($charset)) $charset=$this->forcecharset;
@ -823,6 +832,7 @@ class DoliDBSqlite3 extends DoliDB
* @param string $table Name of table filter ('xxx%') * @param string $table Name of table filter ('xxx%')
* @return array List of tables in an array * @return array List of tables in an array
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLListTables($database, $table='') function DDLListTables($database, $table='')
{ {
$listtables=array(); $listtables=array();
@ -849,6 +859,7 @@ class DoliDBSqlite3 extends DoliDB
* @return array Tableau des informations des champs de la table * @return array Tableau des informations des champs de la table
* TODO modify for sqlite * TODO modify for sqlite
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLInfoTable($table) function DDLInfoTable($table)
{ {
$infotables=array(); $infotables=array();
@ -879,6 +890,7 @@ class DoliDBSqlite3 extends DoliDB
* @param array $keys Tableau des champs cles noms => valeur * @param array $keys Tableau des champs cles noms => valeur
* @return int <0 if KO, >=0 if OK * @return int <0 if KO, >=0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLCreateTable($table,$fields,$primary_key,$type,$unique_keys=null,$fulltext_keys=null,$keys=null) function DDLCreateTable($table,$fields,$primary_key,$type,$unique_keys=null,$fulltext_keys=null,$keys=null)
{ {
// FIXME: $fulltext_keys parameter is unused // FIXME: $fulltext_keys parameter is unused
@ -951,6 +963,7 @@ class DoliDBSqlite3 extends DoliDB
* @param string $table Name of table * @param string $table Name of table
* @return int <0 if KO, >=0 if OK * @return int <0 if KO, >=0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLDropTable($table) function DDLDropTable($table)
{ {
$sql = "DROP TABLE ".$table; $sql = "DROP TABLE ".$table;
@ -968,6 +981,7 @@ class DoliDBSqlite3 extends DoliDB
* @param string $field Optionnel : Name of field if we want description of field * @param string $field Optionnel : Name of field if we want description of field
* @return SQLite3Result Resource * @return SQLite3Result Resource
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLDescTable($table,$field="") function DDLDescTable($table,$field="")
{ {
$sql="DESC ".$table." ".$field; $sql="DESC ".$table." ".$field;
@ -986,6 +1000,7 @@ class DoliDBSqlite3 extends DoliDB
* @param string $field_position Optionnel ex.: "after champtruc" * @param string $field_position Optionnel ex.: "after champtruc"
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLAddField($table,$field_name,$field_desc,$field_position="") function DDLAddField($table,$field_name,$field_desc,$field_position="")
{ {
// cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra // cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra
@ -1028,6 +1043,7 @@ class DoliDBSqlite3 extends DoliDB
* @param string $field_desc Array with description of field format * @param string $field_desc Array with description of field format
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLUpdateField($table,$field_name,$field_desc) function DDLUpdateField($table,$field_name,$field_desc)
{ {
$sql = "ALTER TABLE ".$table; $sql = "ALTER TABLE ".$table;
@ -1049,6 +1065,7 @@ class DoliDBSqlite3 extends DoliDB
* @param string $field_name Name of field to drop * @param string $field_name Name of field to drop
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLDropField($table,$field_name) function DDLDropField($table,$field_name)
{ {
$sql= "ALTER TABLE ".$table." DROP COLUMN `".$field_name."`"; $sql= "ALTER TABLE ".$table." DROP COLUMN `".$field_name."`";
@ -1071,6 +1088,7 @@ class DoliDBSqlite3 extends DoliDB
* @param string $dolibarr_main_db_name Database name where user must be granted * @param string $dolibarr_main_db_name Database name where user must be granted
* @return int <0 if KO, >=0 if OK * @return int <0 if KO, >=0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLCreateUser($dolibarr_main_db_host,$dolibarr_main_db_user,$dolibarr_main_db_pass,$dolibarr_main_db_name) function DDLCreateUser($dolibarr_main_db_host,$dolibarr_main_db_user,$dolibarr_main_db_pass,$dolibarr_main_db_name)
{ {
$sql = "INSERT INTO user "; $sql = "INSERT INTO user ";
@ -1302,6 +1320,7 @@ class DoliDBSqlite3 extends DoliDB
* @param int $day Day * @param int $day Day
* @return int Formatted date * @return int Formatted date
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
private static function calc_daynr($year, $month, $day) { private static function calc_daynr($year, $month, $day) {
$y = $year; $y = $year;
if ($y == 0 && $month == 0) return 0; if ($y == 0 && $month == 0) return 0;
@ -1322,6 +1341,7 @@ class DoliDBSqlite3 extends DoliDB
* @param bool $sunday_first_day_of_week ??? * @param bool $sunday_first_day_of_week ???
* @return int * @return int
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
private static function calc_weekday($daynr, $sunday_first_day_of_week) { private static function calc_weekday($daynr, $sunday_first_day_of_week) {
$ret = floor(($daynr + 5 + ($sunday_first_day_of_week ? 1 : 0)) % 7); $ret = floor(($daynr + 5 + ($sunday_first_day_of_week ? 1 : 0)) % 7);
return $ret; return $ret;
@ -1333,6 +1353,7 @@ class DoliDBSqlite3 extends DoliDB
* @param string $year Year * @param string $year Year
* @return int Nb of days in year * @return int Nb of days in year
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
private static function calc_days_in_year($year) private static function calc_days_in_year($year)
{ {
return (($year & 3) == 0 && ($year%100 || ($year%400 == 0 && $year)) ? 366 : 365); return (($year & 3) == 0 && ($year%100 || ($year%400 == 0 && $year)) ? 366 : 365);
@ -1348,6 +1369,7 @@ class DoliDBSqlite3 extends DoliDB
* @param string $calc_year ??? * @param string $calc_year ???
* @return string ??? * @return string ???
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
private static function calc_week($year, $month, $day, $week_behaviour, &$calc_year) { private static function calc_week($year, $month, $day, $week_behaviour, &$calc_year) {
$daynr=self::calc_daynr($year,$month,$day); $daynr=self::calc_daynr($year,$month,$day);
$first_daynr=self::calc_daynr($year,1,1); $first_daynr=self::calc_daynr($year,1,1);
@ -1388,4 +1410,3 @@ class DoliDBSqlite3 extends DoliDB
} }
} }

View File

@ -1007,6 +1007,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
* @param string $reldir Relative directory where to scan files * @param string $reldir Relative directory where to scan files
* @return int <=0 if KO, >0 if OK * @return int <=0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _load_tables($reldir) function _load_tables($reldir)
{ {
global $conf; global $conf;
@ -1123,6 +1124,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
* *
* @return int Error count (0 if OK) * @return int Error count (0 if OK)
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function insert_boxes($option='') function insert_boxes($option='')
{ {
require_once DOL_DOCUMENT_ROOT . '/core/class/infobox.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/infobox.class.php';
@ -1220,6 +1222,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
* *
* @return int Error count (0 if OK) * @return int Error count (0 if OK)
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function delete_boxes() function delete_boxes()
{ {
global $conf; global $conf;
@ -1295,6 +1298,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
* *
* @return int Error count (0 if OK) * @return int Error count (0 if OK)
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function insert_cronjobs() function insert_cronjobs()
{ {
require_once DOL_DOCUMENT_ROOT . '/core/class/infobox.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/infobox.class.php';
@ -1405,6 +1409,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
* *
* @return int Error count (0 if OK) * @return int Error count (0 if OK)
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function delete_cronjobs() function delete_cronjobs()
{ {
global $conf; global $conf;
@ -1434,6 +1439,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
* *
* @return int Error count (0 if OK) * @return int Error count (0 if OK)
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function delete_tabs() function delete_tabs()
{ {
global $conf; global $conf;
@ -1459,6 +1465,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
* *
* @return int Error count (0 if ok) * @return int Error count (0 if ok)
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function insert_tabs() function insert_tabs()
{ {
global $conf; global $conf;
@ -1526,6 +1533,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
* *
* @return int Error count (0 if OK) * @return int Error count (0 if OK)
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function insert_const() function insert_const()
{ {
global $conf; global $conf;
@ -1595,6 +1603,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
* *
* @return int <0 if KO, 0 if OK * @return int <0 if KO, 0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function delete_const() function delete_const()
{ {
global $conf; global $conf;
@ -1633,6 +1642,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int Error count (0 if OK) * @return int Error count (0 if OK)
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function insert_permissions($reinitadminperms=0, $force_entity=null, $notrigger=0) function insert_permissions($reinitadminperms=0, $force_entity=null, $notrigger=0)
{ {
global $conf,$user; global $conf,$user;
@ -1785,6 +1795,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
* *
* @return int Error count (0 if OK) * @return int Error count (0 if OK)
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function delete_permissions() function delete_permissions()
{ {
global $conf; global $conf;
@ -1810,6 +1821,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
* *
* @return int Error count (0 if OK) * @return int Error count (0 if OK)
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function insert_menus() function insert_menus()
{ {
global $user; global $user;
@ -1919,6 +1931,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
* *
* @return int Error count (0 if OK) * @return int Error count (0 if OK)
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function delete_menus() function delete_menus()
{ {
global $conf; global $conf;
@ -1948,6 +1961,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
* *
* @return int Error count (0 if OK) * @return int Error count (0 if OK)
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function create_dirs() function create_dirs()
{ {
global $langs, $conf; global $langs, $conf;
@ -2009,6 +2023,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
* *
* @return int Error count (0 if OK) * @return int Error count (0 if OK)
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function insert_dirs($name,$dir) function insert_dirs($name,$dir)
{ {
global $conf; global $conf;
@ -2050,6 +2065,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
* *
* @return int Error count (0 if OK) * @return int Error count (0 if OK)
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function delete_dirs() function delete_dirs()
{ {
global $conf; global $conf;
@ -2075,6 +2091,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
* *
* @return int Error count (0 if OK) * @return int Error count (0 if OK)
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function insert_module_parts() function insert_module_parts()
{ {
global $conf; global $conf;
@ -2153,6 +2170,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
* *
* @return int Error count (0 if OK) * @return int Error count (0 if OK)
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function delete_module_parts() function delete_module_parts()
{ {
global $conf; global $conf;

View File

@ -37,6 +37,7 @@ abstract class ModeleAction extends CommonDocGenerator
* @param integer $maxfilenamelength Max length of value to show * @param integer $maxfilenamelength Max length of value to show
* @return array List of templates * @return array List of templates
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function liste_modeles($db,$maxfilenamelength=0) static function liste_modeles($db,$maxfilenamelength=0)
{ {
global $conf; global $conf;
@ -62,6 +63,7 @@ abstract class ModeleAction extends CommonDocGenerator
* @param int $hideref Hide ref * @param int $hideref Hide ref
* @return int 0 if KO, 1 if OK * @return int 0 if KO, 1 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function action_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) function action_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0)
{ {
global $conf,$langs,$user; global $conf,$langs,$user;

View File

@ -92,6 +92,7 @@ class CommActionRapport
* @param Translate $outputlangs Lang object for output language * @param Translate $outputlangs Lang object for output language
* @return int 1=OK, 0=KO * @return int 1=OK, 0=KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($socid = 0, $catid = 0, $outputlangs='') function write_file($socid = 0, $catid = 0, $outputlangs='')
{ {
global $user,$conf,$langs,$hookmanager; global $user,$conf,$langs,$hookmanager;
@ -99,7 +100,7 @@ class CommActionRapport
if (! is_object($outputlangs)) $outputlangs=$langs; if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
// Load traductions files requiredby by page // Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products")); $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products"));
@ -342,4 +343,3 @@ class CommActionRapport
return $y; return $y;
} }
} }

View File

@ -37,7 +37,7 @@ class pdf_ban extends ModeleBankAccountDoc
{ {
var $emetteur; // Objet societe qui emet var $emetteur; // Objet societe qui emet
var $version = 'development'; var $version = 'development';
/** /**
* Constructor * Constructor
* *
@ -55,7 +55,7 @@ class pdf_ban extends ModeleBankAccountDoc
$this->db = $db; $this->db = $db;
$this->name = "ban"; $this->name = "ban";
$this->description = $langs->trans("DocumentModelBan").' (Volunteer wanted to finish)'; $this->description = $langs->trans("DocumentModelBan").' (Volunteer wanted to finish)';
// Dimension page pour format A4 // Dimension page pour format A4
$this->type = 'pdf'; $this->type = 'pdf';
$formatarray=pdf_getFormat(); $formatarray=pdf_getFormat();
@ -92,6 +92,7 @@ class pdf_ban extends ModeleBankAccountDoc
* @param Translate $outputlangs Lang output object * @param Translate $outputlangs Lang output object
* @return int 1 if OK, <=0 if KO * @return int 1 if OK, <=0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object,$outputlangs) function write_file($object,$outputlangs)
{ {
global $conf, $hookmanager, $langs, $user; global $conf, $hookmanager, $langs, $user;
@ -99,7 +100,7 @@ class pdf_ban extends ModeleBankAccountDoc
if (! is_object($outputlangs)) $outputlangs=$langs; if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
// Load traductions files requiredby by page // Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "dict", "companies", "projects")); $outputlangs->loadLangs(array("main", "dict", "companies", "projects"));
@ -119,7 +120,7 @@ class pdf_ban extends ModeleBankAccountDoc
$dir = $conf->bank->dir_output . "/" . $objectref; $dir = $conf->bank->dir_output . "/" . $objectref;
$file = $dir . "/" . $objectref . ".pdf"; $file = $dir . "/" . $objectref . ".pdf";
} }
if (! file_exists($dir)) if (! file_exists($dir))
{ {
if (dol_mkdir($dir) < 0) if (dol_mkdir($dir) < 0)
@ -208,9 +209,9 @@ class pdf_ban extends ModeleBankAccountDoc
$pdf->SetXY($this->marge_gauche, $curY); $pdf->SetXY($this->marge_gauche, $curY);
$pdf->MultiCell(200, 3, $outputlangs->trans("BAN").' : '.$object->account_number, 0, 'L'); $pdf->MultiCell(200, 3, $outputlangs->trans("BAN").' : '.$object->account_number, 0, 'L');
// Show square // Show square
if ($pagenb == 1) if ($pagenb == 1)
{ {
@ -248,7 +249,7 @@ class pdf_ban extends ModeleBankAccountDoc
@chmod($file, octdec($conf->global->MAIN_UMASK)); @chmod($file, octdec($conf->global->MAIN_UMASK));
$this->result = array('fullpath'=>$file); $this->result = array('fullpath'=>$file);
return 1; // Pas d'erreur return 1; // Pas d'erreur
} }
else else
@ -388,4 +389,3 @@ class pdf_ban extends ModeleBankAccountDoc
} }
} }

View File

@ -37,7 +37,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
{ {
var $emetteur; // Objet societe qui emet var $emetteur; // Objet societe qui emet
var $version = 'dolibarr'; var $version = 'dolibarr';
/** /**
* Constructor * Constructor
* *
@ -46,7 +46,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
function __construct($db) function __construct($db)
{ {
global $conf,$langs,$mysoc; global $conf,$langs,$mysoc;
// Translations // Translations
$langs->loadLangs(array("main", "bank", "withdrawals", "companies")); $langs->loadLangs(array("main", "bank", "withdrawals", "companies"));
@ -95,6 +95,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
* @param null|array $moreparams More parameters * @param null|array $moreparams More parameters
* @return int 1 if OK, <=0 if KO * @return int 1 if OK, <=0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object, $outputlangs, $srctemplatepath='', $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) function write_file($object, $outputlangs, $srctemplatepath='', $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null)
{ {
global $conf, $hookmanager, $langs, $user, $mysoc; global $conf, $hookmanager, $langs, $user, $mysoc;
@ -102,10 +103,10 @@ class pdf_sepamandate extends ModeleBankAccountDoc
if (! is_object($outputlangs)) $outputlangs=$langs; if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
// Translations // Translations
$outputlangs->loadLangs(array("main", "dict", "withdrawals", "companies", "projects", "bills")); $outputlangs->loadLangs(array("main", "dict", "withdrawals", "companies", "projects", "bills"));
if (! empty($conf->bank->dir_output)) if (! empty($conf->bank->dir_output))
{ {
//$nblignes = count($object->lines); // This is set later with array of tasks //$nblignes = count($object->lines); // This is set later with array of tasks
@ -124,7 +125,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
else $dir = $conf->bank->dir_output . "/" . $objectref; else $dir = $conf->bank->dir_output . "/" . $objectref;
$file = $dir . "/" . $langs->transnoentitiesnoconv("SepaMandateShort").' '.$objectref . "-".dol_sanitizeFileName($object->rum).".pdf"; $file = $dir . "/" . $langs->transnoentitiesnoconv("SepaMandateShort").' '.$objectref . "-".dol_sanitizeFileName($object->rum).".pdf";
} }
if (! file_exists($dir)) if (! file_exists($dir))
{ {
if (dol_mkdir($dir) < 0) if (dol_mkdir($dir) < 0)
@ -212,55 +213,55 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$nexY = $tab_top + 7; $nexY = $tab_top + 7;
$posY = $curY; $posY = $curY;
$pdf->SetFont('','', $default_font_size); $pdf->SetFont('','', $default_font_size);
$pdf->line($this->marge_gauche, $posY, $this->page_largeur - $this->marge_droite, $posY); $pdf->line($this->marge_gauche, $posY, $this->page_largeur - $this->marge_droite, $posY);
$posY+=2; $posY+=2;
$pdf->SetXY($this->marge_gauche, $posY); $pdf->SetXY($this->marge_gauche, $posY);
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("RUMLong").' ('.$outputlangs->transnoentitiesnoconv("RUM").')'.' : '.$object->rum, 0, 'L'); $pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("RUMLong").' ('.$outputlangs->transnoentitiesnoconv("RUM").')'.' : '.$object->rum, 0, 'L');
$posY=$pdf->GetY(); $posY=$pdf->GetY();
$posY+=2; $posY+=2;
$pdf->SetXY($this->marge_gauche, $posY); $pdf->SetXY($this->marge_gauche, $posY);
$ics=''; $ics='';
if (! empty($conf->global->PRELEVEMENT_ICS)) $ics=$conf->global->PRELEVEMENT_ICS; if (! empty($conf->global->PRELEVEMENT_ICS)) $ics=$conf->global->PRELEVEMENT_ICS;
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("CreditorIdentifier").' ('.$outputlangs->transnoentitiesnoconv("ICS").')'.' : '.$ics, 0, 'L'); $pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("CreditorIdentifier").' ('.$outputlangs->transnoentitiesnoconv("ICS").')'.' : '.$ics, 0, 'L');
$posY=$pdf->GetY(); $posY=$pdf->GetY();
$posY+=1; $posY+=1;
$pdf->SetXY($this->marge_gauche, $posY); $pdf->SetXY($this->marge_gauche, $posY);
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("CreditorName").' : '.$mysoc->name, 0, 'L'); $pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("CreditorName").' : '.$mysoc->name, 0, 'L');
$posY=$pdf->GetY(); $posY=$pdf->GetY();
$posY+=1; $posY+=1;
$pdf->SetXY($this->marge_gauche, $posY); $pdf->SetXY($this->marge_gauche, $posY);
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("Address").' : ', 0, 'L'); $pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("Address").' : ', 0, 'L');
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $mysoc->getFullAddress(), 0, 'L'); $pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $mysoc->getFullAddress(), 0, 'L');
$posY=$pdf->GetY(); $posY=$pdf->GetY();
$posY+=3; $posY+=3;
$pdf->line($this->marge_gauche, $posY, $this->page_largeur - $this->marge_droite, $posY); $pdf->line($this->marge_gauche, $posY, $this->page_largeur - $this->marge_droite, $posY);
$pdf->SetFont('','', $default_font_size - 1); $pdf->SetFont('','', $default_font_size - 1);
$posY+=8; $posY+=8;
$pdf->SetXY($this->marge_gauche, $posY); $pdf->SetXY($this->marge_gauche, $posY);
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 8, $outputlangs->transnoentitiesnoconv("SEPALegalText", $mysoc->name, $mysoc->name), 0, 'L'); $pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 8, $outputlangs->transnoentitiesnoconv("SEPALegalText", $mysoc->name, $mysoc->name), 0, 'L');
// Your data form // Your data form
$posY=$pdf->GetY(); $posY=$pdf->GetY();
$posY+=8; $posY+=8;
$pdf->line($this->marge_gauche, $posY, $this->page_largeur - $this->marge_droite, $posY); $pdf->line($this->marge_gauche, $posY, $this->page_largeur - $this->marge_droite, $posY);
$posY+=2; $posY+=2;
$pdf->SetFont('','', $default_font_size); $pdf->SetFont('','', $default_font_size);
$pdf->SetXY($this->marge_gauche, $posY); $pdf->SetXY($this->marge_gauche, $posY);
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("SEPAFillForm"), 0, 'C'); $pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("SEPAFillForm"), 0, 'C');
$thirdparty=new Societe($this->db); $thirdparty=new Societe($this->db);
if ($object->socid > 0) $thirdparty->fetch($object->socid); if ($object->socid > 0) $thirdparty->fetch($object->socid);
@ -275,7 +276,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("SEPAFormYourName").' * : ', 0, 'L'); $pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("SEPAFormYourName").' * : ', 0, 'L');
$pdf->SetXY(80, $posY); $pdf->SetXY(80, $posY);
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $sepaname, 0, 'L'); $pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $sepaname, 0, 'L');
$address = '______________________________________________'; $address = '______________________________________________';
if ($thirdparty->id > 0) if ($thirdparty->id > 0)
{ {
@ -293,7 +294,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$pdf->SetXY(80, $posY); $pdf->SetXY(80, $posY);
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $address, 0, 'L'); $pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $address, 0, 'L');
} }
$ban = '__________________________________________________'; $ban = '__________________________________________________';
if (! empty($object->iban)) $ban = $object->iban; if (! empty($object->iban)) $ban = $object->iban;
$posY=$pdf->GetY(); $posY=$pdf->GetY();
@ -302,7 +303,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("SEPAFormYourBAN").' * : ', 0, 'L'); $pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("SEPAFormYourBAN").' * : ', 0, 'L');
$pdf->SetXY(80, $posY); $pdf->SetXY(80, $posY);
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $ban, 0, 'L'); $pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $ban, 0, 'L');
$bic = '__________________________________________________'; $bic = '__________________________________________________';
if (! empty($object->bic)) $bic = $object->bic; if (! empty($object->bic)) $bic = $object->bic;
$posY=$pdf->GetY(); $posY=$pdf->GetY();
@ -311,8 +312,8 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("SEPAFormYourBIC").' * : ', 0, 'L'); $pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("SEPAFormYourBIC").' * : ', 0, 'L');
$pdf->SetXY(80, $posY); $pdf->SetXY(80, $posY);
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $bic, 0, 'L'); $pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $bic, 0, 'L');
$posY=$pdf->GetY(); $posY=$pdf->GetY();
$posY+=1; $posY+=1;
$pdf->SetXY($this->marge_gauche, $posY); $pdf->SetXY($this->marge_gauche, $posY);
@ -338,13 +339,13 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$txt = '('.$langs->transnoentitiesnoconv("PleaseCheckOne").')'; $txt = '('.$langs->transnoentitiesnoconv("PleaseCheckOne").')';
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $txt, 0, 'L'); $pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $txt, 0, 'L');
} }
$posY=$pdf->GetY(); $posY=$pdf->GetY();
$posY+=3; $posY+=3;
$pdf->line($this->marge_gauche, $posY, $this->page_largeur - $this->marge_droite, $posY); $pdf->line($this->marge_gauche, $posY, $this->page_largeur - $this->marge_droite, $posY);
$posY+=3; $posY+=3;
// Show square // Show square
if ($pagenb == 1) if ($pagenb == 1)
{ {
@ -362,10 +363,10 @@ class pdf_sepamandate extends ModeleBankAccountDoc
var_dump($heightforfreetext); var_dump($heightforfreetext);
var_dump($heightforfooter); var_dump($heightforfooter);
var_dump($bottomlasttab);*/ var_dump($bottomlasttab);*/
// Affiche zone infos // Affiche zone infos
$posy=$this->_tableau_info($pdf, $object, $bottomlasttab, $outputlangs); $posy=$this->_tableau_info($pdf, $object, $bottomlasttab, $outputlangs);
/* /*
* Pied de page * Pied de page
*/ */
@ -391,7 +392,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
@chmod($file, octdec($conf->global->MAIN_UMASK)); @chmod($file, octdec($conf->global->MAIN_UMASK));
$this->result = array('fullpath'=>$file); $this->result = array('fullpath'=>$file);
return 1; // Pas d'erreur return 1; // Pas d'erreur
} }
else else
@ -426,7 +427,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
} }
/** /**
* Show miscellaneous information (payment mode, payment term, ...) * Show miscellaneous information (payment mode, payment term, ...)
* *
@ -436,32 +437,33 @@ class pdf_sepamandate extends ModeleBankAccountDoc
* @param Translate $outputlangs Langs object * @param Translate $outputlangs Langs object
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _tableau_info(&$pdf, $object, $posy, $outputlangs) function _tableau_info(&$pdf, $object, $posy, $outputlangs)
{ {
global $conf, $mysoc; global $conf, $mysoc;
$default_font_size = pdf_getPDFFontSize($outputlangs); $default_font_size = pdf_getPDFFontSize($outputlangs);
$diffsizetitle=(empty($conf->global->PDF_DIFFSIZE_TITLE)?1:$conf->global->PDF_DIFFSIZE_TITLE); $diffsizetitle=(empty($conf->global->PDF_DIFFSIZE_TITLE)?1:$conf->global->PDF_DIFFSIZE_TITLE);
$posy+=$this->_signature_area($pdf, $object, $posy, $outputlangs); $posy+=$this->_signature_area($pdf, $object, $posy, $outputlangs);
$pdf->SetXY($this->marge_gauche, $posy); $pdf->SetXY($this->marge_gauche, $posy);
$pdf->SetFont('','', $default_font_size); $pdf->SetFont('','', $default_font_size);
$pdf->MultiCell(100, 3, $outputlangs->transnoentitiesnoconv("PleaseReturnMandate", $mysoc->email).':', 0, 'L', 0); $pdf->MultiCell(100, 3, $outputlangs->transnoentitiesnoconv("PleaseReturnMandate", $mysoc->email).':', 0, 'L', 0);
$posy=$pdf->GetY()+2; $posy=$pdf->GetY()+2;
$pdf->SetXY($this->marge_gauche, $posy); $pdf->SetXY($this->marge_gauche, $posy);
$pdf->SetFont('','', $default_font_size - $diffsizetitle); $pdf->SetFont('','', $default_font_size - $diffsizetitle);
$pdf->MultiCell(100, 6, $mysoc->name, 0, 'L', 0); $pdf->MultiCell(100, 6, $mysoc->name, 0, 'L', 0);
$pdf->MultiCell(100, 6, $outputlangs->convToOutputCharset($mysoc->getFullAddress()), 0, 'L', 0); $pdf->MultiCell(100, 6, $outputlangs->convToOutputCharset($mysoc->getFullAddress()), 0, 'L', 0);
$posy=$pdf->GetY()+2; $posy=$pdf->GetY()+2;
return $posy; return $posy;
} }
/** /**
* Show area for the customer to sign * Show area for the customer to sign
* *
@ -471,21 +473,22 @@ class pdf_sepamandate extends ModeleBankAccountDoc
* @param Translate $outputlangs Objet langs * @param Translate $outputlangs Objet langs
* @return int Position pour suite * @return int Position pour suite
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _signature_area(&$pdf, $object, $posy, $outputlangs) function _signature_area(&$pdf, $object, $posy, $outputlangs)
{ {
$default_font_size = pdf_getPDFFontSize($outputlangs); $default_font_size = pdf_getPDFFontSize($outputlangs);
$tab_top = $posy + 4; $tab_top = $posy + 4;
$tab_hl = 4; $tab_hl = 4;
$posx = $this->marge_gauche; $posx = $this->marge_gauche;
$pdf->SetXY($posx, $tab_top + 0); $pdf->SetXY($posx, $tab_top + 0);
$pdf->SetFont('','', $default_font_size - 2); $pdf->SetFont('','', $default_font_size - 2);
$pdf->MultiCell(100, 3, $outputlangs->transnoentitiesnoconv("DateOfSignature"), 0, 'L', 0); $pdf->MultiCell(100, 3, $outputlangs->transnoentitiesnoconv("DateOfSignature"), 0, 'L', 0);
$pdf->MultiCell(100, 3, ' '); $pdf->MultiCell(100, 3, ' ');
$pdf->MultiCell(100, 3, '______________________', 0, 'L', 0); $pdf->MultiCell(100, 3, '______________________', 0, 'L', 0);
$posx = 120; $posx = 120;
$largcol = ($this->page_largeur - $this->marge_droite - $posx); $largcol = ($this->page_largeur - $this->marge_droite - $posx);
$useborder=0; $useborder=0;
@ -494,14 +497,14 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$pdf->SetFillColor(255,255,255); $pdf->SetFillColor(255,255,255);
$pdf->SetXY($posx, $tab_top + 0); $pdf->SetXY($posx, $tab_top + 0);
$pdf->MultiCell($largcol, $tab_hl, $outputlangs->transnoentitiesnoconv("Signature"), 0, 'L', 1); $pdf->MultiCell($largcol, $tab_hl, $outputlangs->transnoentitiesnoconv("Signature"), 0, 'L', 1);
$pdf->SetXY($posx, $tab_top + $tab_hl); $pdf->SetXY($posx, $tab_top + $tab_hl);
$pdf->MultiCell($largcol, $tab_hl*3, '', 1, 'R'); $pdf->MultiCell($largcol, $tab_hl*3, '', 1, 'R');
return ($tab_hl*7); return ($tab_hl*7);
} }
/** /**
* Show top header of page. * Show top header of page.
* *
@ -612,4 +615,3 @@ class pdf_sepamandate extends ModeleBankAccountDoc
} }
} }

View File

@ -40,18 +40,18 @@ abstract class ModeleBankAccountDoc extends CommonDocGenerator
* @param DoliDB $db Database handler * @param DoliDB $db Database handler
* @param integer $maxfilenamelength Max length of value to show * @param integer $maxfilenamelength Max length of value to show
* @return array List of templates * @return array List of templates
*/ */
static function liste_modeles($db,$maxfilenamelength=0) // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function liste_modeles($db, $maxfilenamelength=0)
{ {
global $conf; global $conf;
$type='bankaccount'; $type = 'bankaccount';
$liste=array(); $list = array();
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
$liste=getListOfModels($db,$type,$maxfilenamelength); $list = getListOfModels($db, $type, $maxfilenamelength);
return $liste; return $list;
} }
} }

View File

@ -224,13 +224,14 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
/** /**
* Return if a code is used (by other element) * Return if a code is used (by other element)
* *
* @param DoliDB $db Handler acces base * @param DoliDB $db Handler acces base
* @param string $code Code to check * @param string $code Code to check
* @param Product $product Objet product * @param Product $product Objet product
* @return int 0 if available, <0 if KO * @return int 0 if available, <0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function verif_dispo($db, $code, $product) function verif_dispo($db, $code, $product)
{ {
$sql = "SELECT barcode FROM ".MAIN_DB_PREFIX."product"; $sql = "SELECT barcode FROM ".MAIN_DB_PREFIX."product";
@ -263,6 +264,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
* @param string $typefortest Type of barcode (ISBN, EAN, ...) * @param string $typefortest Type of barcode (ISBN, EAN, ...)
* @return int 0 if OK, <0 if KO * @return int 0 if OK, <0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function verif_syntax($codefortest, $typefortest) function verif_syntax($codefortest, $typefortest)
{ {
global $conf; global $conf;
@ -302,4 +304,3 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
} }
} }

View File

@ -44,7 +44,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
function __construct($db) function __construct($db)
{ {
global $conf,$langs,$mysoc; global $conf,$langs,$mysoc;
// Load traductions files requiredby by page // Load traductions files requiredby by page
$langs->loadLangs(array("main", "bills")); $langs->loadLangs(array("main", "bills"));
@ -77,12 +77,13 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
/** /**
* Fonction to generate document on disk * Fonction to generate document on disk
* *
* @param RemiseCheque $object Object RemiseCheque * @param RemiseCheque $object Object RemiseCheque
* @param string $_dir Directory * @param string $_dir Directory
* @param string $number Number * @param string $number Number
* @param Translate $outputlangs Lang output object * @param Translate $outputlangs Lang output object
* @return int 1=ok, 0=ko * @return int 1=ok, 0=ko
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object, $_dir, $number, $outputlangs) function write_file($object, $_dir, $number, $outputlangs)
{ {
global $user,$conf,$langs,$hookmanager; global $user,$conf,$langs,$hookmanager;
@ -91,7 +92,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
$sav_charset_output=$outputlangs->charset_output; $sav_charset_output=$outputlangs->charset_output;
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
// Load traductions files requiredby by page // Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "companies", "bills", "products", "compta")); $outputlangs->loadLangs(array("main", "companies", "bills", "products", "compta"));
@ -191,7 +192,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
@chmod($file, octdec($conf->global->MAIN_UMASK)); @chmod($file, octdec($conf->global->MAIN_UMASK));
$this->result = array('fullpath'=>$file); $this->result = array('fullpath'=>$file);
$outputlangs->charset_output=$sav_charset_output; $outputlangs->charset_output=$sav_charset_output;
return 1; // Pas d'erreur return 1; // Pas d'erreur
} }
@ -206,11 +207,12 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
* @param Translate $outputlangs Object language for output * @param Translate $outputlangs Object language for output
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function Header(&$pdf, $page, $pages, $outputlangs) function Header(&$pdf, $page, $pages, $outputlangs)
{ {
global $langs; global $langs;
$default_font_size = pdf_getPDFFontSize($outputlangs); $default_font_size = pdf_getPDFFontSize($outputlangs);
// Load traductions files requiredby by page // Load traductions files requiredby by page
$outputlangs->loadLangs(array("compta", "banks")); $outputlangs->loadLangs(array("compta", "banks"));
@ -312,6 +314,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
* @param Translate $outputlangs Object lang * @param Translate $outputlangs Object lang
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function Body(&$pdf, $pagenb, $pages, $outputlangs) function Body(&$pdf, $pagenb, $pages, $outputlangs)
{ {
// x=10 - Num // x=10 - Num
@ -384,7 +387,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
{ {
$newfreetext=make_substitutions($conf->global->$paramfreetext,$substitutionarray); $newfreetext=make_substitutions($conf->global->$paramfreetext,$substitutionarray);
} }
return pdf_pagefoot($pdf,$outputlangs,$newfreetext,$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext); return pdf_pagefoot($pdf,$outputlangs,$newfreetext,$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
} }
} }

View File

@ -142,6 +142,7 @@ class mod_chequereceipt_mint extends ModeleNumRefChequeReceipts
* @param string $objforref Object for number to search * @param string $objforref Object for number to search
* @return string Next free value * @return string Next free value
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function chequereceipt_get_num($objsoc,$objforref) function chequereceipt_get_num($objsoc,$objforref)
{ {
return $this->getNextValue($objsoc,$objforref); return $this->getNextValue($objsoc,$objforref);

Some files were not shown because too many files have changed in this diff Show More