Ignore:
Timestamp:
Mar 23, 2008, 1:04:46 AM (16 years ago)
Author:
rvelices
Message:
  • remove compatibility with old template ...
File:
1 edited

Legend:

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

    r2265 r2290  
    279279  global $template;
    280280
    281   // TODO - remove from here after old template removed
     281  $tpl_cats = array();
    282282  foreach ($categories as $category)
    283283  {
    284     $selected = '';
    285     if (in_array($category['id'], $selecteds))
    286     {
    287       $selected = ' selected="selected"';
    288     }
    289 
    290284    if ($fullname)
    291285    {
     
    300294      $option.= '- '.$category['name'];
    301295    }
    302 
    303     $template->_old->assign_block_vars(
    304       $blockname,
    305       array('SELECTED'=>$selected,
    306             'VALUE'=>$category['id'],
    307             'OPTION'=>$option
    308         ));
    309   }
    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     }
    326296    $tpl_cats[ $category['id'] ] = $option;
    327297  }
    328298
    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);
    331301}
    332302
Note: See TracChangeset for help on using the changeset viewer.