aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/category_default.inc.php7
-rw-r--r--include/functions.inc.php14
-rw-r--r--template/yoga/index.tpl2
3 files changed, 11 insertions, 12 deletions
diff --git a/include/category_default.inc.php b/include/category_default.inc.php
index 1d8438d93..19a8d7633 100644
--- a/include/category_default.inc.php
+++ b/include/category_default.inc.php
@@ -103,8 +103,7 @@ foreach ($pictures as $row)
'CLASS' => 'thumbElmt',
)
);
- if ($user['show_nb_hits']
- and isset($page['category']))
+ if ($user['show_nb_hits'])
{
$template->assign_block_vars(
'thumbnails.line.thumbnail.nb_hits',
@@ -155,9 +154,7 @@ foreach ($pictures as $row)
);
}
- if ($user['show_nb_comments']
- and isset($page['category'])
- and $page['category']['commentable'])
+ if ($user['show_nb_comments'])
{
$query = '
SELECT COUNT(*) AS nb_comments
diff --git a/include/functions.inc.php b/include/functions.inc.php
index 46651c284..6b44c81dc 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -1012,12 +1012,14 @@ function l10n($key)
function l10n_dec($singular_fmt_key, $plural_fmt_key, $decimal)
{
global $lang_info;
- if ( $lang_info['zero_plural'] and $decimal == 0 )
- {
- return sprintf(l10n($plural_fmt_key), 0);
- }
- return sprintf(l10n(($decimal > 1 ? $plural_fmt_key :
- $singular_fmt_key)), $decimal);
+
+ return
+ sprintf(
+ l10n((
+ (($decimal > 1) or ($decimal == 0 and $lang_info['zero_plural']))
+ ? $plural_fmt_key
+ : $singular_fmt_key
+ )), $decimal);
}
/**
diff --git a/template/yoga/index.tpl b/template/yoga/index.tpl
index c47b82f30..cb50158e8 100644
--- a/template/yoga/index.tpl
+++ b/template/yoga/index.tpl
@@ -32,7 +32,7 @@
<!-- END mode_normal -->
<!-- BEGIN flat -->
- <li><a href="{flat.URL}" title="{lang:mode_flat_hint}" rel="nofollow"><img src="{pwg_root}{themeconf:icon_dir}/flat.png" class="button" alt="{lang:flat_hint}"></a></li>
+ <li><a href="{flat.URL}" title="{lang:mode_flat_hint}" rel="nofollow"><img src="{pwg_root}{themeconf:icon_dir}/flat.png" class="button" alt="{lang:mode_flat_hint}"></a></li>
<!-- END flat -->
<!-- BEGIN mode_posted -->