mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
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
This commit is contained in:
@@ -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'] );
|
||||
|
||||
Reference in New Issue
Block a user