aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_calendar.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2007-02-27 01:56:16 +0000
committerrvelices <rv-github@modusoptimus.com>2007-02-27 01:56:16 +0000
commit47512ce6a64fa356214c162a8313480c6aed41d2 (patch)
treea0e35e2f89ef789f380adc5b8951444c189de4e7 /include/functions_calendar.inc.php
parentbfb4b15d2f75835033d9bbb865edd77dcb282bb6 (diff)
- refactoring page['category'] before 1.7 release
page['category'] is not an id anymore, but an associative array of category info all of page['cat_xxx'] or page['uppercats'] merged into one simplifies calls to make_index_url give plugins a clean start for page variables for version 1.7 git-svn-id: http://piwigo.org/svn/trunk@1861 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_calendar.inc.php')
-rw-r--r--include/functions_calendar.inc.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/include/functions_calendar.inc.php b/include/functions_calendar.inc.php
index a29536c71..86ef40837 100644
--- a/include/functions_calendar.inc.php
+++ b/include/functions_calendar.inc.php
@@ -1,10 +1,9 @@
<?php
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
-// | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
-// | branch : BSF (Best So Far)
-// | file : $RCSfile$
+// | file : $Id$
// | last update : $Date$
// | last modifier : $Author$
// | revision : $Revision$
@@ -34,17 +33,16 @@ function initialize_calendar()
//------------------ initialize the condition on items to take into account ---
$inner_sql = ' FROM ' . IMAGES_TABLE;
- if ($page['section']=='categories' or
- ( isset($page['category']) and is_numeric($page['category']) ) )
+ if ($page['section']=='categories')
{ // we will regenerate the items by including subcats elements
$page['items'] = array();
$inner_sql .= '
INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON id = image_id';
- if (isset($page['category']) and is_numeric($page['category']))
+ if ( isset($page['category']) )
{
$sub_ids = array_diff(
- get_subcat_ids(array($page['category'])),
+ get_subcat_ids(array($page['category']['id'])),
explode(',', $user['forbidden_categories'])
);