move phpcs:ignore
This commit is contained in:
parent
22b9632555
commit
2a9ef8dc05
@ -528,15 +528,16 @@ class AccountingAccount extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Account deactivated
|
||||
*
|
||||
* @param int $id Id
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function account_desactivate($id)
|
||||
{
|
||||
// phpcs:enable
|
||||
$result = $this->checkUsage();
|
||||
|
||||
if ($result > 0) {
|
||||
@ -562,15 +563,16 @@ class AccountingAccount extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Account activated
|
||||
*
|
||||
* @param int $id Id
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function account_activate($id)
|
||||
{
|
||||
// phpcs:enable
|
||||
$this->db->begin();
|
||||
|
||||
$sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_account ";
|
||||
@ -601,6 +603,7 @@ class AccountingAccount extends CommonObject
|
||||
return $this->LibStatut($this->status,$mode);
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Renvoi le libelle d'un statut donne
|
||||
*
|
||||
@ -608,9 +611,9 @@ 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
|
||||
* @return string Label of status
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function LibStatut($statut,$mode=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
$langs->loadLangs(array("users"));
|
||||
|
||||
@ -620,27 +623,27 @@ class AccountingAccount extends CommonObject
|
||||
if ($statut == 1) return $langs->trans('Enabled');
|
||||
if ($statut == 0) return $langs->trans('Disabled');
|
||||
}
|
||||
if ($mode == 1)
|
||||
elseif ($mode == 1)
|
||||
{
|
||||
if ($statut == 1) return $langs->trans('Enabled');
|
||||
if ($statut == 0) return $langs->trans('Disabled');
|
||||
}
|
||||
if ($mode == 2)
|
||||
elseif ($mode == 2)
|
||||
{
|
||||
if ($statut == 1) return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled');
|
||||
if ($statut == 0) return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('Disabled');
|
||||
}
|
||||
if ($mode == 3)
|
||||
elseif ($mode == 3)
|
||||
{
|
||||
if ($statut == 1) return img_picto($langs->trans('Enabled'),'statut4');
|
||||
if ($statut == 0) return img_picto($langs->trans('Disabled'),'statut5');
|
||||
}
|
||||
if ($mode == 4)
|
||||
elseif ($mode == 4)
|
||||
{
|
||||
if ($statut == 1) return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled');
|
||||
if ($statut == 0) return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('Disabled');
|
||||
}
|
||||
if ($mode == 5)
|
||||
elseif ($mode == 5)
|
||||
{
|
||||
if ($statut == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'),'statut4');
|
||||
if ($statut == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut5');
|
||||
|
||||
@ -75,16 +75,17 @@ abstract class ActionsAdherentCardCommon
|
||||
//}
|
||||
}
|
||||
|
||||
/**
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Set content of ->tpl array, to use into template
|
||||
*
|
||||
* @param string $action Type of action
|
||||
* @param int $id Id
|
||||
* @return string HTML output
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function assign_values(&$action, $id)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $langs, $user, $canvas;
|
||||
global $form, $formcompany, $objsoc;
|
||||
|
||||
@ -233,14 +234,15 @@ abstract class ActionsAdherentCardCommon
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Assign POST values into object
|
||||
*
|
||||
* @return string HTML output
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
private function assign_post()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs, $mysoc;
|
||||
|
||||
$this->object->old_name = $_POST["old_name"];
|
||||
|
||||
@ -67,6 +67,7 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon
|
||||
return $out;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Assign custom values for canvas
|
||||
*
|
||||
@ -74,9 +75,9 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon
|
||||
* @param int $id Id
|
||||
* @return void
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function assign_values(&$action, $id)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $limit, $offset, $sortfield, $sortorder;
|
||||
global $conf, $db, $langs, $user;
|
||||
global $form;
|
||||
@ -121,6 +122,7 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Fetch datas list and save into ->list_datas
|
||||
*
|
||||
@ -130,9 +132,9 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon
|
||||
* @param string $sortorder Sort order ('ASC' or 'DESC')
|
||||
* @return void
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function LoadListDatas($limit, $offset, $sortfield, $sortorder)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $langs;
|
||||
|
||||
//$this->getFieldList();
|
||||
|
||||
@ -29,8 +29,8 @@ include_once DOL_DOCUMENT_ROOT.'/contact/canvas/actions_contactcard_common.class
|
||||
*/
|
||||
class ActionsContactCardDefault extends ActionsContactCardCommon
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Handler acces base de donnees
|
||||
* @param string $dirmodule Name of directory of module
|
||||
@ -66,6 +66,7 @@ class ActionsContactCardDefault extends ActionsContactCardCommon
|
||||
return $out;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Assign custom values for canvas
|
||||
*
|
||||
@ -73,9 +74,9 @@ class ActionsContactCardDefault extends ActionsContactCardCommon
|
||||
* @param int $id Id
|
||||
* @return void
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function assign_values(&$action, $id)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $limit, $offset, $sortfield, $sortorder;
|
||||
global $conf, $db, $langs, $user;
|
||||
global $form;
|
||||
@ -120,6 +121,7 @@ class ActionsContactCardDefault extends ActionsContactCardCommon
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Fetch datas list and save into ->list_datas
|
||||
*
|
||||
@ -129,9 +131,9 @@ class ActionsContactCardDefault extends ActionsContactCardCommon
|
||||
* @param string $sortorder Sort order ('ASC' or 'DESC')
|
||||
* @return void
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function LoadListDatas($limit, $offset, $sortfield, $sortorder)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $langs;
|
||||
|
||||
//$this->getFieldList();
|
||||
|
||||
@ -39,17 +39,17 @@ class EmailSenderProfile extends CommonObject
|
||||
* @var string ID to identify managed object
|
||||
*/
|
||||
public $element = 'emailsenderprofile';
|
||||
|
||||
|
||||
/**
|
||||
* @var string Name of table without prefix where object is stored
|
||||
*/
|
||||
public $table_element = 'c_email_senderprofile';
|
||||
|
||||
|
||||
/**
|
||||
* @var array Does emailsenderprofile support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for emailsenderprofile
|
||||
*/
|
||||
@ -310,6 +310,7 @@ class EmailSenderProfile extends CommonObject
|
||||
return $this->LibStatut($this->status,$mode);
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return the status
|
||||
*
|
||||
@ -317,43 +318,36 @@ 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
|
||||
* @return string Label of status
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
static function LibStatut($status,$mode=0)
|
||||
{
|
||||
global $langs;
|
||||
|
||||
if ($mode == 0)
|
||||
{
|
||||
$prefix='';
|
||||
if ($status == 1) return $langs->trans('Enabled');
|
||||
if ($status == 0) return $langs->trans('Disabled');
|
||||
}
|
||||
if ($mode == 1)
|
||||
if ($mode == 0 || $mode == 1)
|
||||
{
|
||||
if ($status == 1) return $langs->trans('Enabled');
|
||||
if ($status == 0) return $langs->trans('Disabled');
|
||||
}
|
||||
if ($mode == 2)
|
||||
elseif ($mode == 2)
|
||||
{
|
||||
if ($status == 1) return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled');
|
||||
if ($status == 0) return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('Disabled');
|
||||
}
|
||||
if ($mode == 3)
|
||||
elseif ($mode == 3)
|
||||
{
|
||||
if ($status == 1) return img_picto($langs->trans('Enabled'),'statut4');
|
||||
if ($status == 0) return img_picto($langs->trans('Disabled'),'statut5');
|
||||
}
|
||||
if ($mode == 4)
|
||||
elseif ($mode == 4)
|
||||
{
|
||||
if ($status == 1) return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled');
|
||||
if ($status == 0) return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('Disabled');
|
||||
}
|
||||
if ($mode == 5)
|
||||
elseif ($mode == 5)
|
||||
{
|
||||
if ($status == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'),'statut4');
|
||||
if ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut5');
|
||||
}
|
||||
if ($mode == 6)
|
||||
elseif ($mode == 6)
|
||||
{
|
||||
if ($status == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'),'statut4');
|
||||
if ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut5');
|
||||
|
||||
@ -33,7 +33,7 @@ class FormProjets
|
||||
* @var DoliDB Database handler.
|
||||
*/
|
||||
public $db;
|
||||
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
@ -51,6 +51,7 @@ class FormProjets
|
||||
return 1;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Output a combo list with projects qualified for a third party / user
|
||||
*
|
||||
@ -71,9 +72,9 @@ class FormProjets
|
||||
* @param int $htmlid Html id to use instead of htmlname
|
||||
* @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='')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs,$conf,$form;
|
||||
|
||||
$out='';
|
||||
@ -119,6 +120,7 @@ class FormProjets
|
||||
else return $out;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Returns an array with projects qualified for a third party
|
||||
*
|
||||
@ -139,9 +141,9 @@ class FormProjets
|
||||
* @param string $morecss More CSS
|
||||
* @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')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$conf,$langs;
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
@ -470,6 +472,7 @@ class FormProjets
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Build a HTML select list of element of same thirdparty to suggest to link them to project
|
||||
*
|
||||
@ -480,9 +483,9 @@ class FormProjets
|
||||
* @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
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function select_element($table_element, $socid=0, $morecss='', $limitonstatus=-2,$projectkey="fk_projet")
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $langs;
|
||||
|
||||
if ($table_element == 'projet_task') return ''; // Special cas of element we never link to a project (already always done)
|
||||
|
||||
@ -88,6 +88,7 @@ class FormSms
|
||||
return 1;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Show the form to input an sms.
|
||||
*
|
||||
@ -95,9 +96,9 @@ class FormSms
|
||||
* @param int $showform Show form tags and submit button (recommanded is to use with value 0)
|
||||
* @return void
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function show_form($morecss='titlefield', $showform=1)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $langs, $user, $form;
|
||||
|
||||
if (! is_object($form)) $form=new Form($this->db);
|
||||
|
||||
@ -96,14 +96,15 @@ class Menu
|
||||
$this->liste=array_merge($array_start,$array_new,$array_end);
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Remove a menu entry from this->liste
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function remove_last()
|
||||
{
|
||||
// phpcs:enable
|
||||
if (count($this->liste) > 1) {
|
||||
array_pop($this->liste);
|
||||
}
|
||||
|
||||
@ -999,6 +999,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Create tables and keys required by module.
|
||||
* Files module.sql and module.key.sql with create table and create keys
|
||||
@ -1008,9 +1009,9 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
* @param string $reldir Relative directory where to scan files
|
||||
* @return int <=0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function _load_tables($reldir)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$error=0;
|
||||
@ -1118,6 +1119,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Adds boxes
|
||||
*
|
||||
@ -1125,9 +1127,9 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
*
|
||||
* @return int Error count (0 if OK)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function insert_boxes($option='')
|
||||
{
|
||||
// phpcs:enable
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/infobox.class.php';
|
||||
|
||||
global $conf;
|
||||
@ -1218,14 +1220,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Removes boxes
|
||||
*
|
||||
* @return int Error count (0 if OK)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function delete_boxes()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$err=0;
|
||||
@ -1294,14 +1297,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
return $err;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Adds cronjobs
|
||||
*
|
||||
* @return int Error count (0 if OK)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function insert_cronjobs()
|
||||
{
|
||||
// phpcs:enable
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/infobox.class.php';
|
||||
|
||||
global $conf;
|
||||
@ -1408,14 +1412,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Removes boxes
|
||||
*
|
||||
* @return int Error count (0 if OK)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function delete_cronjobs()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$err=0;
|
||||
@ -1438,14 +1443,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
return $err;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Removes tabs
|
||||
*
|
||||
* @return int Error count (0 if OK)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function delete_tabs()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$err=0;
|
||||
@ -1464,14 +1470,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
return $err;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Adds tabs
|
||||
*
|
||||
* @return int Error count (0 if ok)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function insert_tabs()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$err=0;
|
||||
@ -1532,14 +1539,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
return $err;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Adds constants
|
||||
*
|
||||
* @return int Error count (0 if OK)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function insert_const()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$err=0;
|
||||
@ -1602,14 +1610,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
return $err;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Removes constants tagged 'deleteonunactive'
|
||||
*
|
||||
* @return int <0 if KO, 0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function delete_const()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$err=0;
|
||||
@ -1638,6 +1647,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
return $err;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Adds access rights
|
||||
*
|
||||
@ -1646,9 +1656,9 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
|
||||
* @return int Error count (0 if OK)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function insert_permissions($reinitadminperms=0, $force_entity=null, $notrigger=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$user;
|
||||
|
||||
$err=0;
|
||||
@ -1794,14 +1804,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Removes access rights
|
||||
*
|
||||
* @return int Error count (0 if OK)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function delete_permissions()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$err=0;
|
||||
@ -1820,14 +1831,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Adds menu entries
|
||||
*
|
||||
* @return int Error count (0 if OK)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function insert_menus()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user;
|
||||
|
||||
if (! is_array($this->menu) || empty($this->menu)) return 0;
|
||||
@ -1930,14 +1942,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Removes menu entries
|
||||
*
|
||||
* @return int Error count (0 if OK)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function delete_menus()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$err=0;
|
||||
@ -1960,14 +1973,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
return $err;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Creates directories
|
||||
*
|
||||
* @return int Error count (0 if OK)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function create_dirs()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs, $conf;
|
||||
|
||||
$err=0;
|
||||
@ -2019,6 +2033,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Adds directories definitions
|
||||
*
|
||||
@ -2027,9 +2042,9 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
*
|
||||
* @return int Error count (0 if OK)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function insert_dirs($name,$dir)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$err=0;
|
||||
@ -2064,14 +2079,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Removes directories
|
||||
*
|
||||
* @return int Error count (0 if OK)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function delete_dirs()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$err=0;
|
||||
@ -2090,14 +2106,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
return $err;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Adds generic parts
|
||||
*
|
||||
* @return int Error count (0 if OK)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function insert_module_parts()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$error=0;
|
||||
@ -2169,14 +2186,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
return $error;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Removes generic parts
|
||||
*
|
||||
* @return int Error count (0 if OK)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function delete_module_parts()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$err=0;
|
||||
|
||||
@ -223,6 +223,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return if a code is used (by other element)
|
||||
*
|
||||
@ -231,9 +232,9 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
|
||||
* @param Product $product Objet product
|
||||
* @return int 0 if available, <0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function verif_dispo($db, $code, $product)
|
||||
{
|
||||
// phpcs:enable
|
||||
$sql = "SELECT barcode FROM ".MAIN_DB_PREFIX."product";
|
||||
$sql.= " WHERE barcode = '".$code."'";
|
||||
if ($product->id > 0) $sql.= " AND rowid <> ".$product->id;
|
||||
@ -256,6 +257,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return if a barcode value match syntax
|
||||
*
|
||||
@ -263,9 +265,9 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
|
||||
* @param string $typefortest Type of barcode (ISBN, EAN, ...)
|
||||
* @return int 0 if OK, <0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function verif_syntax($codefortest, $typefortest)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$result = 0;
|
||||
|
||||
@ -40,6 +40,7 @@ abstract class ModelePDFFicheinter extends CommonDocGenerator
|
||||
public $error='';
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
*
|
||||
@ -47,9 +48,9 @@ abstract class ModelePDFFicheinter extends CommonDocGenerator
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
static function liste_modeles($db,$maxfilenamelength=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$type='ficheinter';
|
||||
@ -148,6 +149,7 @@ abstract class ModeleNumRefFicheinter
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Create an intervention document on disk using template defined into FICHEINTER_ADDON_PDF
|
||||
*
|
||||
@ -160,9 +162,9 @@ abstract class ModeleNumRefFicheinter
|
||||
* @param int $hideref Hide ref
|
||||
* @return int 0 if KO, 1 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function fichinter_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$langs,$user;
|
||||
$langs->load("ficheinter");
|
||||
|
||||
|
||||
@ -40,6 +40,7 @@ class ModelePDFCards
|
||||
public $error='';
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
*
|
||||
@ -47,9 +48,9 @@ class ModelePDFCards
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function liste_modeles($db,$maxfilenamelength=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$type='member';
|
||||
@ -63,6 +64,7 @@ class ModelePDFCards
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Cree un fichier de cartes de visites en fonction du modele de ADHERENT_CARDS_ADDON_PDF
|
||||
*
|
||||
@ -74,9 +76,9 @@ class ModelePDFCards
|
||||
* @param string $template pdf generenate document class to use default 'standard'
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function members_card_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $outputdir='', $template='standard')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$langs;
|
||||
$langs->load("members");
|
||||
|
||||
|
||||
@ -41,7 +41,7 @@ class ProductFournisseur extends Product
|
||||
* @var DoliDB Database handler.
|
||||
*/
|
||||
public $db;
|
||||
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
@ -53,7 +53,7 @@ class ProductFournisseur extends Product
|
||||
* @var int ID
|
||||
*/
|
||||
public $id;
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see ref_supplier
|
||||
@ -104,15 +104,16 @@ class ProductFournisseur extends Product
|
||||
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Remove all prices for this couple supplier-product
|
||||
*
|
||||
* @param int $id_fourn Supplier Id
|
||||
* @return int < 0 if error, > 0 if ok
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function remove_fournisseur($id_fourn)
|
||||
{
|
||||
// phpcs:enable
|
||||
$ok=1;
|
||||
|
||||
$this->db->begin();
|
||||
@ -141,15 +142,16 @@ class ProductFournisseur extends Product
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Remove a price for a couple supplier-product
|
||||
*
|
||||
* @param int $rowid Line id of price
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function remove_product_fournisseur_price($rowid)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $user;
|
||||
|
||||
$error=0;
|
||||
@ -186,6 +188,7 @@ class ProductFournisseur extends Product
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Modify the purchase price for a supplier
|
||||
*
|
||||
@ -212,9 +215,9 @@ class ProductFournisseur extends Product
|
||||
* @param string $desc_fourn Custom description for product_fourn_price
|
||||
* @return int <0 if KO, >=0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function update_buyprice($qty, $buyprice, $user, $price_base_type, $fourn, $availability, $ref_fourn, $tva_tx, $charges=0, $remise_percent=0, $remise=0, $newnpr=0, $delivery_time_days=0, $supplier_reputation='', $localtaxes_array=array(), $newdefaultvatcode='', $multicurrency_buyprice=0, $multicurrency_price_base_type='HT',$multicurrency_tx=1,$multicurrency_code='', $desc_fourn='')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $langs;
|
||||
//global $mysoc;
|
||||
|
||||
@ -441,6 +444,7 @@ class ProductFournisseur extends Product
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Loads the price information of a provider
|
||||
*
|
||||
@ -448,9 +452,9 @@ class ProductFournisseur extends Product
|
||||
* @param int $ignore_expression Ignores the math expression for calculating price and uses the db value instead
|
||||
* @return int < 0 if KO, 0 if OK but not found, > 0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function fetch_product_fournisseur_price($rowid, $ignore_expression = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$sql = "SELECT pfp.rowid, pfp.price, pfp.quantity, pfp.unitprice, pfp.remise_percent, pfp.remise, pfp.tva_tx, pfp.default_vat_code, pfp.info_bits as fourn_tva_npr, pfp.fk_availability,";
|
||||
@ -529,6 +533,7 @@ class ProductFournisseur extends Product
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* List all supplier prices of a product
|
||||
*
|
||||
@ -539,9 +544,9 @@ class ProductFournisseur extends Product
|
||||
* @param int $offset Offset
|
||||
* @return array Array of Products with new properties to define supplier price
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function list_product_fournisseur_price($prodid, $sortfield='', $sortorder='', $limit=0, $offset=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$sql = "SELECT s.nom as supplier_name, s.rowid as fourn_id,";
|
||||
@ -630,6 +635,7 @@ class ProductFournisseur extends Product
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Load properties for minimum price
|
||||
*
|
||||
@ -638,9 +644,9 @@ class ProductFournisseur extends Product
|
||||
* @param int $socid get min price for specific supplier
|
||||
* @return int <0 if KO, 0=Not found of no product id provided, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function find_min_price_product_fournisseur($prodid, $qty=0, $socid=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
if (empty($prodid))
|
||||
@ -818,6 +824,7 @@ class ProductFournisseur extends Product
|
||||
return $thirdparty->getNomUrl($withpicto,$option,$maxlen,$notooltip);
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Display price of product
|
||||
*
|
||||
@ -829,9 +836,9 @@ class ProductFournisseur extends Product
|
||||
* to display in table format.
|
||||
* @return string String with supplier price
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function display_price_product_fournisseur($showunitprice=1,$showsuptitle=1,$maxlen=0,$notooltip=0, $productFournList=array())
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
|
||||
$out = '';
|
||||
|
||||
@ -42,7 +42,7 @@ class MailmanSpip
|
||||
* @var DoliDB Database handler.
|
||||
*/
|
||||
public $db;
|
||||
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
@ -170,15 +170,16 @@ class MailmanSpip
|
||||
return $result;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Fonction qui donne les droits redacteurs dans spip
|
||||
*
|
||||
* @param Adherent $object Object with data (->firstname, ->lastname, ->email and ->login)
|
||||
* @return int =0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function add_to_spip($object)
|
||||
{
|
||||
// phpcs:enable
|
||||
dol_syslog(get_class($this)."::add_to_spip");
|
||||
|
||||
if ($this->isSpipEnabled())
|
||||
@ -213,15 +214,16 @@ class MailmanSpip
|
||||
return 0;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Fonction qui enleve les droits redacteurs dans spip
|
||||
*
|
||||
* @param Adherent $object Object with data (->login)
|
||||
* @return int =0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function del_to_spip($object)
|
||||
{
|
||||
// phpcs:enable
|
||||
dol_syslog(get_class($this)."::del_to_spip");
|
||||
|
||||
if ($this->isSpipEnabled())
|
||||
@ -253,15 +255,16 @@ class MailmanSpip
|
||||
return 0;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Fonction qui dit si cet utilisateur est un redacteur existant dans spip
|
||||
*
|
||||
* @param object $object Object with data (->login)
|
||||
* @return int 1=exists, 0=does not exists, -1=error
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function is_in_spip($object)
|
||||
{
|
||||
// phpcs:enable
|
||||
if ($this->isSpipEnabled())
|
||||
{
|
||||
if ($this->checkSpipConfig())
|
||||
@ -304,6 +307,7 @@ class MailmanSpip
|
||||
return -1;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Subscribe an email to all mailing-lists
|
||||
*
|
||||
@ -311,9 +315,9 @@ class MailmanSpip
|
||||
* @param array $listes To force mailing-list (string separated with ,)
|
||||
* @return int <0 if KO, >=0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function add_to_mailman($object,$listes='')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$langs,$user;
|
||||
|
||||
dol_syslog(get_class($this)."::add_to_mailman");
|
||||
@ -376,6 +380,7 @@ class MailmanSpip
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Unsubscribe an email from all mailing-lists
|
||||
* Used when a user is resiliated
|
||||
@ -384,9 +389,9 @@ class MailmanSpip
|
||||
* @param array $listes To force mailing-list (string separated with ,)
|
||||
* @return int <0 if KO, >=0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function del_to_mailman($object,$listes='')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$langs,$user;
|
||||
|
||||
dol_syslog(get_class($this)."::del_to_mailman");
|
||||
|
||||
@ -31,7 +31,7 @@ abstract class ActionsCardCommon
|
||||
* @var DoliDB Database handler.
|
||||
*/
|
||||
public $db;
|
||||
|
||||
|
||||
var $dirmodule;
|
||||
var $targetmodule;
|
||||
var $canvas;
|
||||
@ -41,12 +41,12 @@ abstract class ActionsCardCommon
|
||||
var $tpl = array();
|
||||
//! Object container
|
||||
var $object;
|
||||
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error='';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @var string[] Error codes (or messages)
|
||||
@ -70,6 +70,7 @@ abstract class ActionsCardCommon
|
||||
$this->object = $object;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Assign custom values for canvas (for example into this->tpl to be used by templates)
|
||||
*
|
||||
@ -78,9 +79,9 @@ abstract class ActionsCardCommon
|
||||
* @param string $ref Ref of object
|
||||
* @return void
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function assign_values(&$action, $id=0, $ref='')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $langs, $user, $mysoc, $canvas;
|
||||
global $form, $formadmin, $formcompany;
|
||||
|
||||
@ -370,15 +371,16 @@ abstract class ActionsCardCommon
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Assign POST values into object
|
||||
*
|
||||
* @param string $action Action string
|
||||
* @return string HTML output
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
private function assign_post($action)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs, $mysoc;
|
||||
|
||||
$this->object->id = $_POST["socid"];
|
||||
|
||||
@ -84,6 +84,7 @@ class ActionsCardIndividual extends ActionsCardCommon
|
||||
return $return;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Assign custom values for canvas (for example into this->tpl to be used by templates)
|
||||
*
|
||||
@ -92,9 +93,9 @@ class ActionsCardIndividual extends ActionsCardCommon
|
||||
* @param string $ref Ref of object
|
||||
* @return void
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function assign_values(&$action, $id=0, $ref='')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $langs;
|
||||
global $form, $formcompany;
|
||||
|
||||
|
||||
@ -39,12 +39,12 @@ class WebsitePage extends CommonObject
|
||||
* @var string Id to identify managed objects
|
||||
*/
|
||||
public $element = 'websitepage';
|
||||
|
||||
|
||||
/**
|
||||
* @var string Name of table without prefix where object is stored
|
||||
*/
|
||||
public $table_element = 'website_page';
|
||||
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for websitepage. Must be the part after the 'object_' into object_myobject.png
|
||||
*/
|
||||
@ -467,6 +467,7 @@ class WebsitePage extends CommonObject
|
||||
return $this->LibStatut($this->status,$mode);
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Renvoi le libelle d'un status donne
|
||||
*
|
||||
@ -474,9 +475,9 @@ class WebsitePage 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
|
||||
* @return string Label of status
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function LibStatut($status,$mode=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
|
||||
if ($mode == 0)
|
||||
@ -485,27 +486,27 @@ class WebsitePage extends CommonObject
|
||||
if ($status == 1) return $langs->trans('Enabled');
|
||||
if ($status == 0) return $langs->trans('Disabled');
|
||||
}
|
||||
if ($mode == 1)
|
||||
elseif ($mode == 1)
|
||||
{
|
||||
if ($status == 1) return $langs->trans('Enabled');
|
||||
if ($status == 0) return $langs->trans('Disabled');
|
||||
}
|
||||
if ($mode == 2)
|
||||
elseif ($mode == 2)
|
||||
{
|
||||
if ($status == 1) return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled');
|
||||
if ($status == 0) return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('Disabled');
|
||||
}
|
||||
if ($mode == 3)
|
||||
elseif ($mode == 3)
|
||||
{
|
||||
if ($status == 1) return img_picto($langs->trans('Enabled'),'statut4');
|
||||
if ($status == 0) return img_picto($langs->trans('Disabled'),'statut5');
|
||||
}
|
||||
if ($mode == 4)
|
||||
elseif ($mode == 4)
|
||||
{
|
||||
if ($status == 1) return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled');
|
||||
if ($status == 0) return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('Disabled');
|
||||
}
|
||||
if ($mode == 5)
|
||||
elseif ($mode == 5)
|
||||
{
|
||||
if ($status == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'),'statut4');
|
||||
if ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut5');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user