From dbf28f42ffd6dda2f2f0713fac753904cdaf1f2e Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 20 Jun 2011 10:40:25 +0000 Subject: [PATCH] Fix: instantiate object --- htdocs/comm/action/class/actioncomm.class.php | 11 ++++++----- htdocs/core/class/html.formactions.class.php | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index c5aa8a226c0..ccc474b0fbf 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -420,8 +420,9 @@ class ActionComm extends CommonObject for($i=0;$i<$num;$i++) { $obj = $this->db->fetch_object($resql); - $this->fetch($obj->id); - $this->actions[$i] = $this; + $actioncommstatic = new ActionComm($this->db); + $actioncommstatic->fetch($obj->id); + $this->actions[$i] = $actioncommstatic; } } $this->db->free($resql); @@ -620,15 +621,15 @@ class ActionComm extends CommonObject $libelle=$langs->trans("Action".$this->type_code); $libelleshort=''; } - else if (empty($this->label)) + else if (empty($this->libelle)) { $libelle=$langs->trans("Action".$this->type_code); $libelleshort=$langs->trans("Action".$this->type_code,'','','','',$maxlength); } else { - $libelle=$this->label; - $libelleshort=dol_trunc($this->label,$maxlength); + $libelle=$this->libelle; + $libelleshort=dol_trunc($this->libelle,$maxlength); } if ($withpicto) diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index c933971ce0c..6b8ee25caff 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -126,7 +126,7 @@ class FormActions print ''; print ''; print "\n"; - + foreach($actioncomm->actions as $action) { $var=!$var;
'.$langs->trans('Ref').''.$langs->trans('Date').''.$langs->trans('Action').''.$langs->trans('By').'