diff --git a/htdocs/adherents/canvas/actions_adherentcard_common.class.php b/htdocs/adherents/canvas/actions_adherentcard_common.class.php
index 8d629175902..a749ff269e5 100644
--- a/htdocs/adherents/canvas/actions_adherentcard_common.class.php
+++ b/htdocs/adherents/canvas/actions_adherentcard_common.class.php
@@ -48,7 +48,7 @@ abstract class ActionsAdherentCardCommon
/**
- * Instantiation of DAO class
+ * Instantiation of DAO class. Init ->object
*
* @return int 0
* @deprecated Using getInstanceDao should not be used.
@@ -83,18 +83,18 @@ abstract class ActionsAdherentCardCommon
*/
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);
}
else
- {
+ {*/
$object = new Adherent($this->db);
if (! empty($id)) $object->fetch($id);
$this->object = $object;
- }
+ //}
}
/**
@@ -121,11 +121,11 @@ abstract class ActionsAdherentCardCommon
// Creation user
$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)
{
- $result2=$nuser->setPassword($user,$_POST["password"],0,1,1);
+ $result2=$nuser->setPassword($user,GETPOST("password"),0,1,1);
if ($result2)
{
$this->db->commit();
@@ -424,13 +424,14 @@ abstract class ActionsAdherentCardCommon
if ($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
{
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;
}
}
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 14dbb304333..5445733852e 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -229,12 +229,13 @@ abstract class CommonObject
public $mode_reglement_id;
/**
- * @var string Payment terms ID
+ * @var int Payment terms ID
* @see setPaymentTerms()
*/
public $cond_reglement_id;
/**
- * @deprecated
+ * @var int Payment terms ID
+ * @deprecated Kept for compatibility
* @see cond_reglement_id;
*/
public $cond_reglement;
diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php
index 3b1c5beb6c1..fecb7904a9c 100644
--- a/htdocs/opensurvey/class/opensurveysondage.class.php
+++ b/htdocs/opensurvey/class/opensurveysondage.class.php
@@ -572,37 +572,37 @@ class Opensurveysondage extends CommonObject
if ($mode == 0)
{
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');
}
elseif ($mode == 1)
{
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');
}
elseif ($mode == 2)
{
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');
}
elseif ($mode == 3)
{
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');
}
elseif ($mode == 4)
{
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');
}
elseif ($mode == 5)
{
if ($status==self::STATUS_DRAFT) return ''.$langs->trans('Draft').' '.img_picto($langs->trans('Draft'),'statut0');
- if ($status==self::STATUS_VALIDATED) return ''.$langs->trans('Opened').$billedtext.' '.img_picto($langs->trans('Opened').$billedtext,'statut1');
+ if ($status==self::STATUS_VALIDATED) return ''.$langs->trans('Opened').' '.img_picto($langs->trans('Opened'),'statut1');
if ($status==self::STATUS_CLOSED) return ''.$langs->trans('Closed').' '.img_picto($langs->trans('Closed'),'statut6');
}
}
diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php
index 74a05cba39d..95d5b33e162 100644
--- a/htdocs/societe/canvas/actions_card_common.class.php
+++ b/htdocs/societe/canvas/actions_card_common.class.php
@@ -23,8 +23,7 @@
*/
/**
- * \class ActionsCardCommon
- * \brief Classe permettant la gestion des tiers par defaut
+ * Classe permettant la gestion des tiers par defaut
*/
abstract class ActionsCardCommon
{