Ignore:
Timestamp:
Feb 10, 2006, 3:10:41 AM (19 years ago)
Author:
rvelices
Message:

feature 77: standard navigation link - finalized

3 small fixes: simplified code (unnecessary $pagetab_expand),
urls in comments (at end of line nl2br issue+regex+html 4 validated) and
$pagewhere correction for most_visited

File:
1 edited

Legend:

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

    r1029 r1031  
    133133    $query.= '
    134134    AND (id_uppercat is NULL';
    135     if (isset ($page['tab_expand']) and count($page['tab_expand']) > 0)
    136     {
    137       $query.= ' OR id_uppercat IN ('.implode(',',$page['tab_expand']).')';
     135    if ( isset( $page['cat'] ) and is_numeric( $page['cat'] ) )
     136    {
     137      $query.= ' OR id_uppercat IN ('.$page['uppercats'].')';
    138138    }
    139139    $query.= ')';
     
    324324  global $conf;
    325325  return array(
    326         array('Default', '', true),
    327         array(get_lang('best_rated_cat'),   'average_rate DESC', $conf['rate']),
    328         array(get_lang('most_visited_cat'), 'hit DESC', true),
    329         array(get_lang('Creation date'), 'date_creation DESC', true),
    330         array(get_lang('Availability date'), 'date_available DESC', true),
    331         array(get_lang('File name'), 'file ASC', true)
     326    array('Default', '', true),
     327    array(l10n('best_rated_cat'),   'average_rate DESC', $conf['rate']),
     328    array(l10n('most_visited_cat'), 'hit DESC', true),
     329    array(l10n('Creation date'), 'date_creation DESC', true),
     330    array(l10n('Availability date'), 'date_available DESC', true),
     331    array(l10n('File name'), 'file ASC', true)
    332332  );
    333333}
     
    372372      $page['cat_uploadable'] = $result['uploadable'];
    373373      $page['cat_commentable'] = $result['commentable'];
     374      $page['cat_id_uppercat'] = $result['id_uppercat'];
    374375      $page['uppercats']      = $result['uppercats'];
    375376      $page['title'] =
     
    469470        if (isset($forbidden))
    470471        {
    471           $page['where'] = "\n".'    AND '.$forbidden;
     472          $page['where'] .= "\n".'    AND '.$forbidden;
    472473        }
    473474
Note: See TracChangeset for help on using the changeset viewer.