diff --git a/htdocs/core/class/commonobjectline.class.php b/htdocs/core/class/commonobjectline.class.php index 66f0b52878c..40bcf3aa529 100644 --- a/htdocs/core/class/commonobjectline.class.php +++ b/htdocs/core/class/commonobjectline.class.php @@ -26,6 +26,8 @@ /** * Parent class for class inheritance lines of business objects * This class is useless for the moment so no inherit are done on it + * + * TODO For the moment we use the extends on CommonObject until PHP min is 5.4 so we can use Traits. */ abstract class CommonObjectLine extends CommonObject { @@ -61,7 +63,7 @@ abstract class CommonObjectLine extends CommonObject } /** - * Returns the label, shot_label or code found in units dictionary from ->fk_unit. + * Returns the label, short_label or code found in units dictionary from ->fk_unit. * A langs->trans() must be called on result to get translated value. * * @param string $type Label type ('long', 'short' or 'code'). This can be a translation key. @@ -104,7 +106,4 @@ abstract class CommonObjectLine extends CommonObject return -1; } } - // Currently we need function at end of file CommonObject for all object lines. Should find a way to avoid duplicate code. - - // For the moment we use the extends on CommonObject until PHP min is 5.4 so use Traits. } diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index 54b1e6b6bb8..aed93b51f6f 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -729,10 +729,10 @@ class EcmDirectory extends CommonObject // We count number of _ to have level (we use strlen that is faster than dol_strlen) $this->cats[$id_categ]['level'] = strlen(preg_replace('/([^_])/i', '', $this->cats[$id_categ]['fullpath'])); - // Traite ces enfants + // Process children $protection++; if ($protection > 20) { - return; // On ne traite pas plus de 20 niveaux + return; // We never go more than 20 levels } if (isset($this->cats[$id_categ]['id_children']) && is_array($this->cats[$id_categ]['id_children'])) { foreach ($this->cats[$id_categ]['id_children'] as $key => $val) {