  |
1 | 1 | | <?php |
| |
2 | 2 | | /* |
  |
3 | | - | $Id: category_tree.php 621 2006-07-16 14:16:00Z hpdl $ |
| |
| 3 | + | $Id: category_tree.php 686 2006-08-14 22:33:22Z hpdl $ |
|
4 | 4 | | |
| |
5 | 5 | | osCommerce, Open Source E-Commerce Solutions |
| |
6 | 6 | | http://www.oscommerce.com |
| |
|
|
 |
… |
|
123 | 123 | | $result .= $this->root_start_string; |
| |
124 | 124 | | } |
| |
125 | 125 | | |
  |
126 | | - | $result .= str_repeat($this->spacer_string, $this->spacer_multiplier * $level) . '<a href="' . tep_href_link(FILENAME_DEFAULT, 'cPath=' . $category_link) . '">'; |
| |
127 | | - | if ($this->follow_cpath === true) { |
| |
128 | | - | if (in_array($category_id, $this->cpath_array)) { |
| |
129 | | - | $result .= $this->cpath_start_string . $category['name'] . $this->cpath_end_string; |
| |
130 | | - | } else { |
| |
131 | | - | $result .= $category['name']; |
| |
132 | | - | } |
| |
| 126 | + | if ( ($this->follow_cpath === true) && in_array($category_id, $this->cpath_array) ) { |
| |
| 127 | + | $link_title = $this->cpath_start_string . $category['name'] . $this->cpath_end_string; |
|
133 | 128 | | } else { |
  |
134 | | - | $result .= $category['name']; |
| |
| 129 | + | $link_title = $category['name']; |
|
135 | 130 | | } |
  |
136 | | - | $result .= '</a>'; |
|
137 | 131 | | |
  |
| 132 | + | $result .= str_repeat($this->spacer_string, $this->spacer_multiplier * $level) . osc_link_object(osc_href_link(FILENAME_DEFAULT, 'cPath=' . $category_link), $link_title); |
| |
| 133 | + | |
  |
138 | 134 | | if ($this->show_category_product_count === true) { |
| |
139 | 135 | | $result .= $this->category_product_count_start_string . $category['count'] . $this->category_product_count_end_string; |
| |
140 | 136 | | } |