diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index c6413b4beae..692a340b6ca 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2013 Regis Houssin * Copyright (C) 2010-2013 Juanjo Menent * Copyright (C) 2012 Christophe Battarel * Copyright (C) 2011-2012 Philippe Grand @@ -464,7 +464,7 @@ abstract class CommonObject $sql.= " WHERE tc.element='".$this->element."'"; if ($activeonly == 1) $sql.= " AND tc.active=1"; // only the active type - + if (! empty($source)) $sql.= " AND tc.source='".$source."'"; $sql.= " ORDER by tc.".$order; @@ -1112,9 +1112,9 @@ abstract class CommonObject $row = $this->db->fetch_row($resql); $rows[] = $row[0]; // Add parent line into array rows $childrens = $this->getChildrenOfLine($row[0]); - if (! empty($children)) + if (! empty($childrens)) { - foreach($children as $child) + foreach($childrens as $child) { array_push($rows, $child); } @@ -2621,7 +2621,7 @@ abstract class CommonObject } } - + /* This is to show add lines */ diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 3296a879523..4f5119697d0 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4,7 +4,7 @@ * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2013 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2006 Marc Barilley/Ocebo * Copyright (C) 2007 Franky Van Liedekerke @@ -800,7 +800,7 @@ class Form while ($i < $num) { $obj = $this->db->fetch_object($resql); - + if ($conf->global->SOCIETE_ADD_REF_IN_LIST) { if (($obj->client) && (!empty($obj->code_client))) { $label = $obj->code_client. ' - '; @@ -814,7 +814,7 @@ class Form { $label=$obj->nom; } - + if ($showtype) { if ($obj->client || $obj->fournisseur) $label.=' ('; @@ -2484,9 +2484,9 @@ class Form /** * Show a confirmation HTML form or AJAX popup. - * Easiest way to use this is with useajax=1. - * If you use useajax='xxx', you must also add jquery code to trigger opening of box (with correct parameters) - * just after calling this method. For example: + * Easiest way to use this is with useajax=1. + * If you use useajax='xxx', you must also add jquery code to trigger opening of box (with correct parameters) + * just after calling this method. For example: * print '