diff options
author | rvelices <rv-github@modusoptimus.com> | 2007-02-20 01:40:40 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2007-02-20 01:40:40 +0000 |
commit | f39bf0bb26d4cf0cf02fec5dc8c06ced0de5846b (patch) | |
tree | e8372e512beb1aa19a67203d98373e487b8edef2 /include/functions_category.inc.php | |
parent | ed4b51f1f140be4f83bdf68a17600f92940ab6f7 (diff) |
- without subcatify, category thumbnail alt text is 'x images in y sub-categories'
- improved display of 'x images in y sub-categories' or 'x images in this category' for cases when categories contain both images and sub-categories
- small lang improvement (plural 'Images within the' instead 'Image within the')
git-svn-id: http://piwigo.org/svn/trunk@1840 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_category.inc.php')
-rw-r--r-- | include/functions_category.inc.php | 14 |
1 files changed, 5 insertions, 9 deletions
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'); |