Code Duplication    Length = 4-8 lines in 2 locations

catalog/admin/includes/functions/general.php 1 location

@@ 122-125 (lines=4) @@
119
      'cd.categories_name'
120
    ]);
121
122
    while ($Qcategories->fetch()) {
123
      if ($exclude != $Qcategories->valueInt('categories_id')) $category_tree_array[] = array('id' => $Qcategories->valueInt('categories_id'), 'text' => $spacing . $Qcategories->value('categories_name'));
124
      $category_tree_array = tep_get_category_tree($Qcategories->valueInt('categories_id'), $spacing . '   ', $exclude, $category_tree_array);
125
    }
126
127
    return $category_tree_array;
128
  }

catalog/includes/functions/general.php 1 location

@@ 538-545 (lines=8) @@
535
    $Qcategories->bindInt(':language_id', $OSCOM_Language->getId());
536
    $Qcategories->execute();
537
538
    while ($Qcategories->fetch()) {
539
      $categories_array[] = array('id' => $Qcategories->valueInt('categories_id'),
540
                                  'text' => $indent . $Qcategories->value('categories_name'));
541
542
      if ($Qcategories->valueInt('categories_id') != $parent_id) {
543
        $categories_array = tep_get_categories($categories_array, $Qcategories->valueInt('categories_id'), $indent . '  ');
544
      }
545
    }
546
547
    return $categories_array;
548
  }