Changeset 2290 for trunk/include/functions_category.inc.php
- Timestamp:
- Mar 23, 2008, 1:04:46 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_category.inc.php
r2265 r2290 279 279 global $template; 280 280 281 // TODO - remove from here after old template removed281 $tpl_cats = array(); 282 282 foreach ($categories as $category) 283 283 { 284 $selected = '';285 if (in_array($category['id'], $selecteds))286 {287 $selected = ' selected="selected"';288 }289 290 284 if ($fullname) 291 285 { … … 300 294 $option.= '- '.$category['name']; 301 295 } 302 303 $template->_old->assign_block_vars(304 $blockname,305 array('SELECTED'=>$selected,306 'VALUE'=>$category['id'],307 'OPTION'=>$option308 ));309 }310 // TODO - remove until here after old template removed311 $tpl_cats = array();312 foreach ($categories as $category)313 {314 if ($fullname)315 {316 $option = get_cat_display_name_cache($category['uppercats'],317 null,318 false);319 }320 else321 {322 $option = str_repeat(' ',323 (3 * substr_count($category['global_rank'], '.')));324 $option.= '- '.$category['name'];325 }326 296 $tpl_cats[ $category['id'] ] = $option; 327 297 } 328 298 329 $template-> smarty->assign( $blockname, $tpl_cats);330 $template-> smarty->assign( $blockname.'_selected', $selecteds);299 $template->assign( $blockname, $tpl_cats); 300 $template->assign( $blockname.'_selected', $selecteds); 331 301 } 332 302
Note: See TracChangeset
for help on using the changeset viewer.