Changeset 9367
- Timestamp:
- Feb 24, 2011, 2:49:48 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_html.inc.php
r8728 r9367 112 112 function get_cat_display_name_cache($uppercats, 113 113 $url = '', 114 $replace_space = true) 114 $replace_space = true, 115 $single_link = false, 116 $link_class = null) 115 117 { 116 118 global $cache, $conf; … … 126 128 127 129 $output = ''; 130 if ($single_link) 131 { 132 $single_url = get_root_url().$url.array_pop(explode(',', $uppercats)); 133 $output.= '<a href="'.$single_url.'"'; 134 if (isset($link_class)) 135 { 136 $output.= ' class="'.$link_class.'"'; 137 } 138 $output.= '>'; 139 } 128 140 $is_first = true; 129 141 foreach (explode(',', $uppercats) as $category_id) … … 146 158 } 147 159 148 if ( !isset($url) )160 if ( !isset($url) or $single_link ) 149 161 { 150 162 $output.= $cat['name']; … … 167 179 } 168 180 } 181 182 if ($single_link and isset($single_url)) 183 { 184 $output.= '</a>'; 185 } 186 169 187 if ($replace_space) 170 188 {
Note: See TracChangeset
for help on using the changeset viewer.