From 358cb736b3ce113e6641cf65d670bfd5cfde965b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Cort=C3=A9s=20Cano?= <38475681+TrapoSAMA@users.noreply.github.com> Date: Fri, 20 Nov 2026 16:19:49 -0300 Subject: [PATCH] Preserve the current origin when paginating the admin log (#1211) use a relative url in viewlog for pagination, which avoids problems if the site is on a custom port. see #1210. Thanks @ztjuh + @TrapoSAMA --- CHANGELOG.TXT | 5 +++++ public/viewlog.php | 3 --- templates/viewlog.tpl | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index 4ca36483..fce581ac 100644 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -7,6 +7,11 @@ # Further details on the project are available at https://github.com/postfixadmin/postfixadmin +Unreleased +---------- + + - Preserve the current origin when paginating the admin log (see #1210). + Version 4.0.7 (2026/11/18) -------------------------- diff --git a/public/viewlog.php b/public/viewlog.php index 9a7a728a..12a0cad9 100644 --- a/public/viewlog.php +++ b/public/viewlog.php @@ -153,8 +153,6 @@ foreach ($tLog as $k => $v) { $tLog[$k] = $v; } } -//get url -$url = explode("?",(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]")[0]; $smarty->assign('domain_list', $list_domains); $smarty->assign('domain_selected', $fDomain); @@ -163,7 +161,6 @@ $smarty->assign('fDomain', $fDomain); $smarty->assign('number_of_pages', $number_of_pages); $smarty->assign('page_number', $page_number); -$smarty->assign('url',$url); $smarty->assign('smarty_template', 'viewlog'); $smarty->display('index.tpl'); diff --git a/templates/viewlog.tpl b/templates/viewlog.tpl index 5386fe75..9b6d021b 100644 --- a/templates/viewlog.tpl +++ b/templates/viewlog.tpl @@ -117,7 +117,7 @@