Little bug fixes

This commit is contained in:
Antonio de la Rosa 2016-03-30 00:42:04 +02:00
parent 16cd13edbc
commit 545286bd4e
3 changed files with 11 additions and 5 deletions

View file

@ -37,4 +37,4 @@ function select_a_row_method_class($class, $idrow, $arr_select=array(), $raw_que
}
?>
?>

View file

@ -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{
}
?>
?>

View file

@ -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{
}
?>
?>