aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/category_cats.inc.php8
-rw-r--r--include/functions_category.inc.php14
-rw-r--r--include/functions_html.inc.php13
-rw-r--r--language/en_UK.iso-8859-1/common.lang.php2
-rw-r--r--language/fr_FR.iso-8859-1/common.lang.php2
5 files changed, 19 insertions, 20 deletions
diff --git a/include/category_cats.inc.php b/include/category_cats.inc.php
index cd54b760e..653d1d869 100644
--- a/include/category_cats.inc.php
+++ b/include/category_cats.inc.php
@@ -4,7 +4,6 @@
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
-// | branch : BSF (Best So Far)
// | file : $Id$
// | last update : $Date$
// | last modifier : $Author$
@@ -246,7 +245,12 @@ if (count($categories) > 0)
array(
'IMAGE' => $thumbnail_src_of[ $category['representative_picture_id'] ],
'IMAGE_ALT' => $category['name'],
- 'IMAGE_TITLE' => $lang['hint_category'],
+ 'IMAGE_TITLE' => get_display_images_count
+ (
+ $category['nb_images'],
+ $category['count_images'],
+ $category['count_categories']
+ ),
'U_IMG_LINK' => make_index_url(
array(
diff --git a/include/functions_category.inc.php b/include/functions_category.inc.php
index f7a27c0eb..9b38ae440 100644
--- a/include/functions_category.inc.php
+++ b/include/functions_category.inc.php
@@ -390,16 +390,12 @@ function get_display_images_count($cat_nb_images, $cat_count_images, $cat_count_
{
$display_text = '';
- // Count of category is main
- // if not picture on categorie, test on sub-categories
- $count = ($cat_nb_images > 0 ? $cat_nb_images : $cat_count_images);
+ if ($cat_count_images>0)
+ {//at least one image direct or indirect
+ $display_text.= l10n_dec('image_available', 'images_available', $cat_count_images);
- if ($count > 0)
- {
- $display_text.= l10n_dec('image_available', 'images_available', $count);
-
- if ($cat_nb_images > 0)
- {
+ if ($cat_count_categories==0 or $cat_nb_images>=$cat_count_images)
+ {//no descendant categories or descendants do not contain images
if (! $short_message)
{
$display_text.= ' '.l10n('images_available_cpl');
diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php
index b995ed7cf..751749490 100644
--- a/include/functions_html.inc.php
+++ b/include/functions_html.inc.php
@@ -458,12 +458,11 @@ function get_html_menu_category($categories)
}
$menu.= '>'.$category['name'].'</a>';
- // Count of category is main
- // if not picture on categorie, test on sub-categories
- if (($category['nb_images'] > 0) or ($category['count_images'] > 0))
- {
+ if ( $category['count_images']>0 )
+ {// at least one direct or indirect image
$menu.= "\n".'<span class="';
- $menu.= ($category['nb_images'] > 0 ? "menuInfoCat"
+ // at least one image in this category -> class menuInfoCat
+ $menu.= ($category['nb_images'] > 0 ? "menuInfoCat"
: "menuInfoCatByChild").'"';
$menu.= ' title="';
$menu.= ' '.get_display_images_count
@@ -473,8 +472,8 @@ function get_html_menu_category($categories)
$category['count_categories'],
false
).'">';
- $menu.= '['.($category['nb_images'] > 0 ? $category['nb_images']
- : $category['count_images']).']';
+ // show total number of images
+ $menu.= '['.$category['count_images'].']';
$menu.= '</span>';
}
$child_date_last = @$category['max_date_last']> @$category['date_last'];
diff --git a/language/en_UK.iso-8859-1/common.lang.php b/language/en_UK.iso-8859-1/common.lang.php
index 1dfa5c243..4b70ce8ca 100644
--- a/language/en_UK.iso-8859-1/common.lang.php
+++ b/language/en_UK.iso-8859-1/common.lang.php
@@ -533,7 +533,7 @@ $lang['random_cat'] = 'Random pictures';
$lang['random_cat_hint'] = 'displays a set of random pictures';
$lang['recent_cats_cat'] = 'Recent categories';
$lang['recent_cats_cat_hint'] = 'displays recently updated categories';
-$lang['recent_image'] = 'Image within the';
+$lang['recent_image'] = 'Images within the';
$lang['recent_period'] = 'Recent period';
$lang['recent_pics_cat'] = 'Recent pictures';
$lang['recent_pics_cat_hint'] = 'displays most recent pictures';
diff --git a/language/fr_FR.iso-8859-1/common.lang.php b/language/fr_FR.iso-8859-1/common.lang.php
index dc6cd2b38..42478be28 100644
--- a/language/fr_FR.iso-8859-1/common.lang.php
+++ b/language/fr_FR.iso-8859-1/common.lang.php
@@ -533,7 +533,7 @@ $lang['random_cat'] = 'Images au hasard';
$lang['random_cat_hint'] = 'afficher un ensemble aléatoire d\'images';
$lang['recent_cats_cat'] = 'Catégories récentes';
$lang['recent_cats_cat_hint'] = 'afficher les catégories récemment mises à jour ou créées';
-$lang['recent_image'] = 'Image de moins de';
+$lang['recent_image'] = 'Images de moins de';
$lang['recent_period'] = 'Période récente';
$lang['recent_pics_cat'] = 'Images récentes';
$lang['recent_pics_cat_hint'] = 'afficher les images les plus récentes';