| @@ 207-210 (lines=4) @@ | ||
| 204 | } |
|
| 205 | ||
| 206 | $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and c.parent_id = '" . (int)$parent_id . "' order by c.sort_order, cd.categories_name"); |
|
| 207 | while ($categories = tep_db_fetch_array($categories_query)) { |
|
| 208 | if ($exclude != $categories['categories_id']) $category_tree_array[] = array('id' => $categories['categories_id'], 'text' => $spacing . $categories['categories_name']); |
|
| 209 | $category_tree_array = tep_get_category_tree($categories['categories_id'], $spacing . ' ', $exclude, $category_tree_array); |
|
| 210 | } |
|
| 211 | ||
| 212 | return $category_tree_array; |
|
| 213 | } |
|
| @@ 544-551 (lines=8) @@ | ||
| 541 | if (!is_array($categories_array)) $categories_array = array(); |
|
| 542 | ||
| 543 | $categories_query = tep_db_query("select c.categories_id, cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where parent_id = '" . (int)$parent_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name"); |
|
| 544 | while ($categories = tep_db_fetch_array($categories_query)) { |
|
| 545 | $categories_array[] = array('id' => $categories['categories_id'], |
|
| 546 | 'text' => $indent . $categories['categories_name']); |
|
| 547 | ||
| 548 | if ($categories['categories_id'] != $parent_id) { |
|
| 549 | $categories_array = tep_get_categories($categories_array, $categories['categories_id'], $indent . ' '); |
|
| 550 | } |
|
| 551 | } |
|
| 552 | ||
| 553 | return $categories_array; |
|
| 554 | } |
|