Ignore:
Timestamp:
Feb 28, 2008, 3:41:48 AM (16 years ago)
Author:
rvelices
Message:
  • migrate many templates to smarty
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_category.inc.php

    r2117 r2223  
    279279  global $template;
    280280
     281  // TODO - remove from here after old template removed
    281282  foreach ($categories as $category)
    282283  {
     
    300301    }
    301302
    302     $template->assign_block_vars(
     303    $template->_old->assign_block_vars(
    303304      $blockname,
    304305      array('SELECTED'=>$selected,
     
    307308        ));
    308309  }
     310  // TODO - remove until here after old template removed
     311  $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    else
     321    {
     322      $option = str_repeat(' ',
     323                           (3 * substr_count($category['global_rank'], '.')));
     324      $option.= '- '.$category['name'];
     325    }
     326    $tpl_cats[ $category['id'] ] = $option;
     327  }
     328
     329  $template->smarty->assign( $blockname, $tpl_cats);
     330  $template->smarty->assign( $blockname.'_selected', $selecteds);
    309331}
    310332
Note: See TracChangeset for help on using the changeset viewer.