Ignore:
Timestamp:
Sep 1, 2004, 11:39:29 PM (20 years ago)
Author:
z0rglub
Message:
  • new special category : random pictures
  • reorganisation of special categories menu : template is used only for template. A special category is presented as the template tells to do so.
  • favorites becomes just another special category
  • bug correction for best rated category : wrong MySQL query if user has forbidden categories (see include/functions_category.inc.php diff)
File:
1 edited

Legend:

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

    r508 r510  
    3939 
    4040$query = '
    41 SELECT DISTINCT(id),file,date_available
     41SELECT DISTINCT(id),file,date_available,category_id
    4242       ,tn_ext,name,filesize,storage_category_id,average_rate
    4343  FROM '.IMAGES_TABLE.' AS i
     
    114114  $thumbnail_title .= ' : '.$filesize.' KB';
    115115  // url link on picture.php page
    116   $url_link = PHPWG_ROOT_PATH.'picture.php?cat='.$page['cat'];
     116  $url_link = PHPWG_ROOT_PATH.'picture.php?';
     117  if ($page['cat'] == 'random')
     118  {
     119    $url_link.= 'cat='.$row['category_id'];
     120  }
     121  else
     122  {
     123   $url_link.= 'cat='.$page['cat'];
     124  }
    117125  $url_link.= '&image_id='.$row['id'];
    118126  if ($page['cat'] == 'search')
Note: See TracChangeset for help on using the changeset viewer.