aboutsummaryrefslogtreecommitdiffstats
path: root/template
diff options
context:
space:
mode:
authorz0rglub <z0rglub@piwigo.org>2004-01-03 20:43:43 +0000
committerz0rglub <z0rglub@piwigo.org>2004-01-03 20:43:43 +0000
commit92d7e3d4021905fd364b4960701c51e68b479205 (patch)
treeaff48d97ab10f22e5d775d1e828f8cf0809a0287 /template
parentd81d510568b7d34e7bdeeb55e7f40285299efb0d (diff)
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
Diffstat (limited to 'template')
-rw-r--r--template/default/htmlfunctions.inc.php6
1 files changed, 3 insertions, 3 deletions
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'] );