Ignore:
Timestamp:
Feb 27, 2007, 2:56:16 AM (17 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

File:
1 edited

Legend:

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

    r1820 r1861  
    22// +-----------------------------------------------------------------------+
    33// | PhpWebGallery - a PHP based picture gallery                           |
    4 // | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net |
    5 // +-----------------------------------------------------------------------+
    6 // | branch        : BSF (Best So Far)
    7 // | file          : $RCSfile$
     4// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
     5// +-----------------------------------------------------------------------+
     6// | file          : $Id$
    87// | last update   : $Date$
    98// | last modifier : $Author$
     
    3534  $inner_sql = ' FROM ' . IMAGES_TABLE;
    3635
    37   if ($page['section']=='categories' or
    38       ( isset($page['category']) and is_numeric($page['category']) ) )
     36  if ($page['section']=='categories')
    3937  { // we will regenerate the items by including subcats elements
    4038    $page['items'] = array();
     
    4240INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON id = image_id';
    4341
    44     if (isset($page['category']) and is_numeric($page['category']))
     42    if ( isset($page['category']) )
    4543    {
    4644      $sub_ids = array_diff(
    47         get_subcat_ids(array($page['category'])),
     45        get_subcat_ids(array($page['category']['id'])),
    4846        explode(',', $user['forbidden_categories'])
    4947        );
Note: See TracChangeset for help on using the changeset viewer.