Ignore:
Timestamp:
Mar 4, 2009, 10:49:21 PM (15 years ago)
Author:
patdenice
Message:

Remove get_html_menu_category function and use smarty abilities.

File:
1 edited

Legend:

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

    r3049 r3171  
    101101  $result = pwg_query($query);
    102102  $cats = array();
     103  $selected_category = isset($page['category']) ? $page['category'] : null;
    103104  while ($row = mysql_fetch_assoc($result))
    104105  {
     106    $child_date_last = @$row['max_date_last']> @$row['date_last'];
     107    $row = array_merge($row,
     108      array(
     109        'NAME' => trigger_event(
     110          'render_category_name',
     111          $row['name'],
     112          'get_categories_menu'
     113        ),
     114        'TITLE' => get_display_images_count(
     115          $row['nb_images'],
     116          $row['count_images'],
     117          $row['count_categories'],
     118          false,
     119          ' / '
     120        ),
     121        'URL' => make_index_url(array('category' => $row)),
     122        'LEVEL' => substr_count($row['global_rank'], '.') + 1,
     123        'ICON_TS' => get_icon($row['max_date_last'], $child_date_last),
     124        'SELECTED' => $selected_category['id'] == $row['id'] ? true : false,
     125        'IS_UPPERCAT' => $selected_category['id_uppercat'] == $row['id'] ? true : false,
     126      )
     127    );
    105128    array_push($cats, $row);
    106129    if ($row['id']==@$page['category']['id']) //save the number of subcats for later optim
     
    115138  }
    116139
    117   return get_html_menu_category($cats, @$page['category'] );
     140  return $cats;
    118141}
    119142
Note: See TracChangeset for help on using the changeset viewer.