Fix scrutinizer errors
This commit is contained in:
parent
0eb12f4c61
commit
5cf8612c58
@ -48,7 +48,7 @@ abstract class ActionsAdherentCardCommon
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiation of DAO class
|
* Instantiation of DAO class. Init ->object
|
||||||
*
|
*
|
||||||
* @return int 0
|
* @return int 0
|
||||||
* @deprecated Using getInstanceDao should not be used.
|
* @deprecated Using getInstanceDao should not be used.
|
||||||
@ -83,18 +83,18 @@ abstract class ActionsAdherentCardCommon
|
|||||||
*/
|
*/
|
||||||
function getObject($id)
|
function getObject($id)
|
||||||
{
|
{
|
||||||
$ret = $this->getInstanceDao();
|
//$ret = $this->getInstanceDao();
|
||||||
|
|
||||||
if (is_object($this->object) && method_exists($this->object,'fetch'))
|
/*if (is_object($this->object) && method_exists($this->object,'fetch'))
|
||||||
{
|
{
|
||||||
if (! empty($id)) $this->object->fetch($id);
|
if (! empty($id)) $this->object->fetch($id);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{*/
|
||||||
$object = new Adherent($this->db);
|
$object = new Adherent($this->db);
|
||||||
if (! empty($id)) $object->fetch($id);
|
if (! empty($id)) $object->fetch($id);
|
||||||
$this->object = $object;
|
$this->object = $object;
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -121,11 +121,11 @@ abstract class ActionsAdherentCardCommon
|
|||||||
|
|
||||||
// Creation user
|
// Creation user
|
||||||
$nuser = new User($this->db);
|
$nuser = new User($this->db);
|
||||||
$result=$nuser->create_from_member($this->object,$_POST["login"]);
|
$result=$nuser->create_from_member($this->object,GETPOST("login"));
|
||||||
|
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$result2=$nuser->setPassword($user,$_POST["password"],0,1,1);
|
$result2=$nuser->setPassword($user,GETPOST("password"),0,1,1);
|
||||||
if ($result2)
|
if ($result2)
|
||||||
{
|
{
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
@ -424,13 +424,14 @@ abstract class ActionsAdherentCardCommon
|
|||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$obj = $this->db->fetch_object($resql);
|
$obj = $this->db->fetch_object($resql);
|
||||||
|
|
||||||
|
$this->object->country_code = $obj->code;
|
||||||
|
$this->object->country = $langs->trans("Country".$obj->code)?$langs->trans("Country".$obj->code):$obj->libelle;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($this->db);
|
dol_print_error($this->db);
|
||||||
}
|
}
|
||||||
$this->object->country_code = $obj->code;
|
|
||||||
$this->object->country = $langs->trans("Country".$obj->code)?$langs->trans("Country".$obj->code):$obj->libelle;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -229,12 +229,13 @@ abstract class CommonObject
|
|||||||
public $mode_reglement_id;
|
public $mode_reglement_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Payment terms ID
|
* @var int Payment terms ID
|
||||||
* @see setPaymentTerms()
|
* @see setPaymentTerms()
|
||||||
*/
|
*/
|
||||||
public $cond_reglement_id;
|
public $cond_reglement_id;
|
||||||
/**
|
/**
|
||||||
* @deprecated
|
* @var int Payment terms ID
|
||||||
|
* @deprecated Kept for compatibility
|
||||||
* @see cond_reglement_id;
|
* @see cond_reglement_id;
|
||||||
*/
|
*/
|
||||||
public $cond_reglement;
|
public $cond_reglement;
|
||||||
|
|||||||
@ -572,37 +572,37 @@ class Opensurveysondage extends CommonObject
|
|||||||
if ($mode == 0)
|
if ($mode == 0)
|
||||||
{
|
{
|
||||||
if ($status==self::STATUS_DRAFT) return $langs->trans('Draft');
|
if ($status==self::STATUS_DRAFT) return $langs->trans('Draft');
|
||||||
if ($status==self::STATUS_VALIDATED) return $langs->trans('Opened').$billedtext;
|
if ($status==self::STATUS_VALIDATED) return $langs->trans('Opened');
|
||||||
if ($status==self::STATUS_CLOSED) return $langs->trans('Closed');
|
if ($status==self::STATUS_CLOSED) return $langs->trans('Closed');
|
||||||
}
|
}
|
||||||
elseif ($mode == 1)
|
elseif ($mode == 1)
|
||||||
{
|
{
|
||||||
if ($status==self::STATUS_DRAFT) return $langs->trans('Draft');
|
if ($status==self::STATUS_DRAFT) return $langs->trans('Draft');
|
||||||
if ($status==self::STATUS_VALIDATED) return $langs->trans('Opened').$billedtext;
|
if ($status==self::STATUS_VALIDATED) return $langs->trans('Opened');
|
||||||
if ($status==self::STATUS_CLOSED) return $langs->trans('Closed');
|
if ($status==self::STATUS_CLOSED) return $langs->trans('Closed');
|
||||||
}
|
}
|
||||||
elseif ($mode == 2)
|
elseif ($mode == 2)
|
||||||
{
|
{
|
||||||
if ($status==self::STATUS_DRAFT) return img_picto($langs->trans('Draft'),'statut0').' '.$langs->trans('Draft');
|
if ($status==self::STATUS_DRAFT) return img_picto($langs->trans('Draft'),'statut0').' '.$langs->trans('Draft');
|
||||||
if ($status==self::STATUS_VALIDATED) return img_picto($langs->trans('Opened'),'statut1').' '.$langs->trans('Opened').$billedtext;
|
if ($status==self::STATUS_VALIDATED) return img_picto($langs->trans('Opened'),'statut1').' '.$langs->trans('Opened');
|
||||||
if ($status==self::STATUS_CLOSED) return img_picto($langs->trans('Closed'),'statut6').' '.$langs->trans('Closed');
|
if ($status==self::STATUS_CLOSED) return img_picto($langs->trans('Closed'),'statut6').' '.$langs->trans('Closed');
|
||||||
}
|
}
|
||||||
elseif ($mode == 3)
|
elseif ($mode == 3)
|
||||||
{
|
{
|
||||||
if ($status==self::STATUS_DRAFT) return img_picto($langs->trans('Draft'),'statut0');
|
if ($status==self::STATUS_DRAFT) return img_picto($langs->trans('Draft'),'statut0');
|
||||||
if ($status==self::STATUS_VALIDATED) return img_picto($langs->trans('Opened').$billedtext,'statut1');
|
if ($status==self::STATUS_VALIDATED) return img_picto($langs->trans('Opened'),'statut1');
|
||||||
if ($status==self::STATUS_CLOSED) return img_picto($langs->trans('Closed'),'statut6');
|
if ($status==self::STATUS_CLOSED) return img_picto($langs->trans('Closed'),'statut6');
|
||||||
}
|
}
|
||||||
elseif ($mode == 4)
|
elseif ($mode == 4)
|
||||||
{
|
{
|
||||||
if ($status==self::STATUS_DRAFT) return img_picto($langs->trans('Draft'),'statut0').' '.$langs->trans('Draft');
|
if ($status==self::STATUS_DRAFT) return img_picto($langs->trans('Draft'),'statut0').' '.$langs->trans('Draft');
|
||||||
if ($status==self::STATUS_VALIDATED) return img_picto($langs->trans('Opened').$billedtext,'statut1').' '.$langs->trans('Opened').$billedtext;
|
if ($status==self::STATUS_VALIDATED) return img_picto($langs->trans('Opened').$billedtext,'statut1').' '.$langs->trans('Opened');
|
||||||
if ($status==self::STATUS_CLOSED) return img_picto($langs->trans('Closed'),'statut6').' '.$langs->trans('Closed');
|
if ($status==self::STATUS_CLOSED) return img_picto($langs->trans('Closed'),'statut6').' '.$langs->trans('Closed');
|
||||||
}
|
}
|
||||||
elseif ($mode == 5)
|
elseif ($mode == 5)
|
||||||
{
|
{
|
||||||
if ($status==self::STATUS_DRAFT) return '<span class="hideonsmartphone">'.$langs->trans('Draft').' </span>'.img_picto($langs->trans('Draft'),'statut0');
|
if ($status==self::STATUS_DRAFT) return '<span class="hideonsmartphone">'.$langs->trans('Draft').' </span>'.img_picto($langs->trans('Draft'),'statut0');
|
||||||
if ($status==self::STATUS_VALIDATED) return '<span class="hideonsmartphone">'.$langs->trans('Opened').$billedtext.' </span>'.img_picto($langs->trans('Opened').$billedtext,'statut1');
|
if ($status==self::STATUS_VALIDATED) return '<span class="hideonsmartphone">'.$langs->trans('Opened').' </span>'.img_picto($langs->trans('Opened'),'statut1');
|
||||||
if ($status==self::STATUS_CLOSED) return '<span class="hideonsmartphone">'.$langs->trans('Closed').' </span>'.img_picto($langs->trans('Closed'),'statut6');
|
if ($status==self::STATUS_CLOSED) return '<span class="hideonsmartphone">'.$langs->trans('Closed').' </span>'.img_picto($langs->trans('Closed'),'statut6');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,8 +23,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \class ActionsCardCommon
|
* Classe permettant la gestion des tiers par defaut
|
||||||
* \brief Classe permettant la gestion des tiers par defaut
|
|
||||||
*/
|
*/
|
||||||
abstract class ActionsCardCommon
|
abstract class ActionsCardCommon
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user