forked from extern/egroupware
fix for (doublicate) bugs:
- [ 1433962 ] Custom fields information saved but not displayed - [ 1376272 ] Contents of user defined fields not saved
This commit is contained in:
parent
8fc1ad4184
commit
20aa316f59
@ -259,10 +259,13 @@
|
|||||||
function read($info_id) // did _not_ ensure ACL
|
function read($info_id) // did _not_ ensure ACL
|
||||||
{
|
{
|
||||||
$info_id = (int) $info_id;
|
$info_id = (int) $info_id;
|
||||||
|
|
||||||
if ($info_id <= 0 || $info_id != $this->data['info_id'] &&
|
if ($info_id && $info_id == $this->data['info_id'])
|
||||||
(!$this->db->select($this->info_table,'*',array('info_id'=>$info_id),__LINE__,__FILE__) ||
|
{
|
||||||
!(($this->data = $this->db->row(true)))))
|
return $this->data; // return the already read entry
|
||||||
|
}
|
||||||
|
if ($info_id <= 0 || !$this->db->select($this->info_table,'*',array('info_id'=>$info_id),__LINE__,__FILE__) ||
|
||||||
|
!(($this->data = $this->db->row(true))))
|
||||||
{
|
{
|
||||||
$this->init( );
|
$this->init( );
|
||||||
return False;
|
return False;
|
||||||
@ -271,13 +274,10 @@
|
|||||||
{
|
{
|
||||||
$this->data['info_responsible'] = $this->data['info_responsible'] ? explode(',',$this->data['info_responsible']) : array();
|
$this->data['info_responsible'] = $this->data['info_responsible'] ? explode(',',$this->data['info_responsible']) : array();
|
||||||
}
|
}
|
||||||
if ($info_id != $this->data['info_id']) // data yet read in
|
$this->db->select($this->extra_table,'info_extra_name,info_extra_value',array('info_id'=>$info_id),__LINE__,__FILE__);
|
||||||
|
while ($this->db->next_record())
|
||||||
{
|
{
|
||||||
$this->db->select($this->extra_table,'info_extra_name,info_extra_value',array('info_id'=>$info_id),__LINE__,__FILE__);
|
$this->data['#'.$this->db->f(0)] = $this->db->f(1);
|
||||||
while ($this->db->next_record())
|
|
||||||
{
|
|
||||||
$this->data['#'.$this->db->f(0)] = $this->db->f(1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return $this->data;
|
return $this->data;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user