Show
Ignore:
Timestamp:
02/27/07 02:56:16 (6 years ago)
Author:
rvelices
Message:

- refactoring pagecategory before 1.7 release
pagecategory is not an id anymore, but an associative array of category info
all of pagecat_xxx or pageuppercats merged into one
simplifies calls to make_index_url
give plugins a clean start for page variables for version 1.7

Files:
1 modified

Legend:

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

    r1851 r1861  
    3636  $query = ' 
    3737SELECT 
    38   id,name, representative_picture_id, comment, nb_images, uppercats, 
     38  id, name, representative_picture_id, comment, nb_images, uppercats, 
    3939  date_last, max_date_last, count_images, count_categories, global_rank 
    4040  FROM '.CATEGORIES_TABLE.' INNER JOIN '.USER_CACHE_CATEGORIES_TABLE.' 
     
    5858  $query = ' 
    5959SELECT 
    60   id,name, representative_picture_id, comment, nb_images, 
     60  id, name, representative_picture_id, comment, nb_images, 
    6161  date_last, max_date_last, count_images, count_categories 
    6262  FROM '.CATEGORIES_TABLE.' INNER JOIN '.USER_CACHE_CATEGORIES_TABLE.' 
    6363  ON id = cat_id and user_id = '.$user['id'].' 
    6464  WHERE id_uppercat '. 
    65   (!isset($page['category']) ? 'is NULL' : '= '.$page['category']).' 
     65  (!isset($page['category']) ? 'is NULL' : '= '.$page['category']['id']).' 
    6666'.get_sql_condition_FandF 
    6767  ( 
     
    207207          'URL'   => make_index_url( 
    208208            array( 
    209               'category' => $category['id'], 
    210               'cat_name' => $category['name'], 
     209              'category' => $category 
    211210              ) 
    212211            ), 
     
    259258          'U_IMG_LINK'  => make_index_url( 
    260259            array( 
    261               'category' => $category['id'], 
    262               'cat_name' => $category['name'], 
     260              'category' => $category 
    263261              ) 
    264262            ),