Little bug fixes
This commit is contained in:
parent
16cd13edbc
commit
545286bd4e
3 changed files with 11 additions and 5 deletions
|
|
@ -77,7 +77,9 @@ class ParentField extends IntegerField{
|
|||
public function process_update_field($class, $name_field, $conditions, $value)
|
||||
{
|
||||
|
||||
$num_rows=$class->select_count($conditions.' and '.$class->idmodel.'='.$value);
|
||||
$class->conditions=$conditions.' and '.$class->idmodel.'='.$value;
|
||||
|
||||
$num_rows=$class->select_count();
|
||||
|
||||
if($num_rows==0)
|
||||
{
|
||||
|
|
@ -100,7 +102,9 @@ class ParentField extends IntegerField{
|
|||
$arr_parent=array();
|
||||
$arr_link_parent=array();
|
||||
|
||||
$query=$this->parent_model->select('', array( $this->parent_model->idmodel, $this->name_component, $field_ident) );
|
||||
$this->parent_model->conditions='';
|
||||
|
||||
$query=$this->parent_model->select(array( $this->parent_model->idmodel, $this->name_component, $field_ident) );
|
||||
|
||||
while(list($id_block, $parent, $name)=webtsys_fetch_row($query))
|
||||
{
|
||||
|
|
@ -143,4 +147,4 @@ class ParentField extends IntegerField{
|
|||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -49,6 +49,8 @@ class SelectModelForm extends SelectForm{
|
|||
|
||||
$query=$this->model->select(array($this->field_name, $this->field_value), $this->raw_query);
|
||||
|
||||
$this->arr_select['']='';
|
||||
|
||||
while($row=$this->model->fetch_array($query))
|
||||
{
|
||||
|
||||
|
|
@ -64,4 +66,4 @@ class SelectModelForm extends SelectForm{
|
|||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue