From d422afa66eea6f1df90968a96b9a739e0a9c9fb2 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Mon, 30 Jan 2023 11:24:13 +0100 Subject: [PATCH] smarty_table_ordered_th: fix computing URL --- includes/smarty.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/smarty.php b/includes/smarty.php index 0e8e3c8..b264562 100644 --- a/includes/smarty.php +++ b/includes/smarty.php @@ -308,7 +308,8 @@ smarty_register_function('format_size','smarty_format_size'); function smarty_table_ordered_th($params, $smarty) { if ($params['order'] && $params['url'] && $params['text'] && is_array($params['search'])) { - echo "".$params['text'].""; + $params['url'] .= (strpos($params['url'], '?') === false?'?':'&')."order=".$params['order']; + echo "".$params['text'].""; } if ($params['order']==$params['search']['order']) { echo (