summaryrefslogtreecommitdiff
path: root/libs/plugins/function.html_table.php
diff options
context:
space:
mode:
authorUwe Tews <uwe.tews@googlemail.com>2017-11-06 01:02:56 +0100
committerUwe Tews <uwe.tews@googlemail.com>2017-11-06 01:02:56 +0100
commit3fc8abeb98305c263cc7a0e1d58aeed62a53faab (patch)
tree80f346bad267cb4a51818e094502fae8133a7a6e /libs/plugins/function.html_table.php
parent3799714d53dac4e5d9543f20cb155c9e3cd8a0a1 (diff)
downloadsmarty-3fc8abeb98305c263cc7a0e1d58aeed62a53faab.tar.gz
smarty-3fc8abeb98305c263cc7a0e1d58aeed62a53faab.tar.bz2
smarty-3fc8abeb98305c263cc7a0e1d58aeed62a53faab.zip
code cleanup and optimizations 3.1.32-dev-34
Diffstat (limited to 'libs/plugins/function.html_table.php')
-rw-r--r--libs/plugins/function.html_table.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/plugins/function.html_table.php b/libs/plugins/function.html_table.php
index 7efcdbd2..420d61af 100644
--- a/libs/plugins/function.html_table.php
+++ b/libs/plugins/function.html_table.php
@@ -127,7 +127,7 @@ function smarty_function_html_table($params)
}
if (is_array($cols)) {
- $cols = ($hdir == 'right') ? $cols : array_reverse($cols);
+ $cols = ($hdir === 'right') ? $cols : array_reverse($cols);
$output .= "<thead><tr>\n";
for ($r = 0; $r < $cols_count; $r ++) {
@@ -141,11 +141,11 @@ function smarty_function_html_table($params)
$output .= "<tbody>\n";
for ($r = 0; $r < $rows; $r ++) {
$output .= "<tr" . smarty_function_html_table_cycle('tr', $tr_attr, $r) . ">\n";
- $rx = ($vdir == 'down') ? $r * $cols_count : ($rows - 1 - $r) * $cols_count;
+ $rx = ($vdir === 'down') ? $r * $cols_count : ($rows - 1 - $r) * $cols_count;
for ($c = 0; $c < $cols_count; $c ++) {
- $x = ($hdir == 'right') ? $rx + $c : $rx + $cols_count - 1 - $c;
- if ($inner != 'cols') {
+ $x = ($hdir === 'right') ? $rx + $c : $rx + $cols_count - 1 - $c;
+ if ($inner !== 'cols') {
/* shuffle x to loop over rows*/
$x = floor($x / $cols_count) + ($x % $cols_count) * $rows;
}