Code Duplication    Length = 15-15 lines in 2 locations

catalog/admin/includes/functions/general.php 2 locations

@@ 990-1004 (lines=15) @@
987
    return $categories_array;
988
  }
989
990
  function tep_output_generated_category_path($id, $from = 'category') {
991
    $calculated_category_path_string = '';
992
    $calculated_category_path = tep_generate_category_path($id, $from);
993
    for ($i=0, $n=sizeof($calculated_category_path); $i<$n; $i++) {
994
      for ($j=0, $k=sizeof($calculated_category_path[$i]); $j<$k; $j++) {
995
        $calculated_category_path_string .= $calculated_category_path[$i][$j]['text'] . '&nbsp;&gt;&nbsp;';
996
      }
997
      $calculated_category_path_string = substr($calculated_category_path_string, 0, -16) . '<br />';
998
    }
999
    $calculated_category_path_string = substr($calculated_category_path_string, 0, -6);
1000
1001
    if (strlen($calculated_category_path_string) < 1) $calculated_category_path_string = OSCOM::getDef('text_top');
1002
1003
    return $calculated_category_path_string;
1004
  }
1005
1006
  function tep_get_generated_category_path_ids($id, $from = 'category') {
1007
    $calculated_category_path_string = '';
@@ 1006-1020 (lines=15) @@
1003
    return $calculated_category_path_string;
1004
  }
1005
1006
  function tep_get_generated_category_path_ids($id, $from = 'category') {
1007
    $calculated_category_path_string = '';
1008
    $calculated_category_path = tep_generate_category_path($id, $from);
1009
    for ($i=0, $n=sizeof($calculated_category_path); $i<$n; $i++) {
1010
      for ($j=0, $k=sizeof($calculated_category_path[$i]); $j<$k; $j++) {
1011
        $calculated_category_path_string .= $calculated_category_path[$i][$j]['id'] . '_';
1012
      }
1013
      $calculated_category_path_string = substr($calculated_category_path_string, 0, -1) . '<br />';
1014
    }
1015
    $calculated_category_path_string = substr($calculated_category_path_string, 0, -6);
1016
1017
    if (strlen($calculated_category_path_string) < 1) $calculated_category_path_string = OSCOM::getDef('text_top');
1018
1019
    return $calculated_category_path_string;
1020
  }
1021
1022
  function tep_remove_category($category_id) {
1023
    $OSCOM_Db = Registry::get('Db');