mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2026-11-20 23:43:26 +03:00
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
This commit is contained in:
1 parent
8d83e19773
commit
358cb736b3
3 files changed
+8
-6
No files matched your search
@@ -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)
|
||||
--------------------------
|
||||
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function go2page(page) {
|
||||
window.location.href = '{$url}?page=' + page + '&fDomain={$fDomain}';
|
||||
}
|
||||
function go2page(page){
|
||||
window.location.href = '?page='+page+'&fDomain={$fDomain}';
|
||||
}
|
||||
</script>
|
||||
Reference in new issue
Block a user