From 11714951b33d340f13400aa8fc9a2b971f8d8e8b Mon Sep 17 00:00:00 2001 From: rvelices Date: Thu, 15 Feb 2007 00:10:41 +0000 Subject: - feature 642: display both subcategory thumbnails and element thumbnails (if a category has both) in the index page - get rid of $page['cat_nb_images'] and $page['thumbnails_include'] (superfluous) - changed sql queries in section_init.inc.php for better performance with flat category view - web service fixes for categories.getList git-svn-id: http://piwigo.org/svn/trunk@1820 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions_calendar.inc.php | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'include/functions_calendar.inc.php') diff --git a/include/functions_calendar.inc.php b/include/functions_calendar.inc.php index 402002733..a29536c71 100644 --- a/include/functions_calendar.inc.php +++ b/include/functions_calendar.inc.php @@ -197,19 +197,12 @@ WHERE id IN (' . implode(',',$page['items']) .')'; $must_show_list = true; // true until calendar generates its own display if (script_basename() != 'picture') // basename without file extention { - $template->assign_block_vars('calendar', array()); - if ($calendar->generate_category_content()) { - unset( - $page['thumbnails_include'], - $page['items'] - ); - + $page['items'] = array(); $must_show_list = false; } - $template->assign_block_vars( 'calendar.views', array() ); foreach ($styles as $style => $style_data) { foreach ($views as $view) @@ -260,9 +253,11 @@ WHERE id IN (' . implode(',',$page['items']) .')'; $calendar_title = '' .$fields[$page['chronology_field']]['label'].''; $calendar_title.= $calendar->get_display_name(); - //this should be an assign_block_vars, but I need to assign 'calendar' - //above and at that point I don't have the title yet. - $template->_tpldata['calendar.'][0]['TITLE'] = $calendar_title; + $template->merge_block_vars('calendar', + array( + 'TITLE' => $calendar_title + ) + ); } // end category calling if ($must_show_list) @@ -293,9 +288,7 @@ WHERE id IN (' . implode(',',$page['items']) .')'; $query .= ' '.$order_by; } - $page['items'] = array_from_query($query, 'id'); - $page['thumbnails_include'] = 'include/category_default.inc.php'; } pwg_debug('end initialize_calendar'); } -- cgit v1.2.3