From 92d7e3d4021905fd364b4960701c51e68b479205 Mon Sep 17 00:00:00 2001 From: z0rglub Date: Sat, 3 Jan 2004 20:43:43 +0000 Subject: the number of subcats of a category is now in the var nb_sub_categories git-svn-id: http://piwigo.org/svn/branches/release-1_3@246 68402e56-0260-453c-a942-63ccdbb3a9ee --- template/default/htmlfunctions.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'template') diff --git a/template/default/htmlfunctions.inc.php b/template/default/htmlfunctions.inc.php index 2010a2768..f56448eb6 100644 --- a/template/default/htmlfunctions.inc.php +++ b/template/default/htmlfunctions.inc.php @@ -178,7 +178,7 @@ function display_category( $category, $indent, $handle ) $vtp->addSession( $handle, 'category' ); $vtp->setVar( $handle, 'category.indent', $indent ); - if ( $user['expand'] or count( $category['subcats'] ) == 0 ) + if ( $user['expand'] or $category['nb_sub_categories'] == 0 ) { $vtp->addSession( $handle, 'bullet_wo_link' ); $vtp->setVar( $handle, 'bullet_wo_link.bullet_url', @@ -220,10 +220,10 @@ function display_category( $category, $indent, $handle ) { $vtp->setVar( $handle, 'category.name_style', 'font-weight:bold;' ); } - if ( count( $category['subcats'] ) > 0 ) + if ( $category['nb_sub_categories'] > 0 ) { $vtp->addSession( $handle, 'subcat' ); - $vtp->setVar( $handle, 'subcat.nb_subcats', count($category['subcats']) ); + $vtp->setVar( $handle,'subcat.nb_subcats',$category['nb_sub_categories'] ); $vtp->closeSession( $handle, 'subcat' ); } $vtp->setVar( $handle, 'category.total_cat', $category['nb_images'] ); -- cgit v1.2.3