diff --git a/inc/mod/pages.php b/inc/mod/pages.php index c21086ed..c8d3e2ad 100644 --- a/inc/mod/pages.php +++ b/inc/mod/pages.php @@ -61,7 +61,11 @@ function mod_login($redirect = false) { } function mod_confirm($request) { - mod_page(_('Confirm action'), 'mod/confirm.html', array('request' => $request, 'token' => make_secure_link_token($request))); + $args = array('request' => $request, 'token' => make_secure_link_token($request)); + if(isset($_GET['thread'])) { + $args['rest'] = 'thread=' . $_GET['thread']; + } + mod_page(_('Confirm action'), 'mod/confirm.html', $args); } function mod_logout() { diff --git a/mod.php b/mod.php index 5428e84d..434853dc 100644 --- a/mod.php +++ b/mod.php @@ -23,6 +23,12 @@ if (get_magic_quotes_gpc()) { $query = isset($_SERVER['QUERY_STRING']) ? rawurldecode($_SERVER['QUERY_STRING']) : ''; +// If there's a thread parameter (eg, for returning to after enacting a ban) +// drop it from the $query. +if(isset($_GET['thread'])) { + $query = explode("&thread=", $query)[0]; +} + $pages = array( '' => ':?/', // redirect to dashboard '/' => 'dashboard', // dashboard diff --git a/templates/mod/confirm.html b/templates/mod/confirm.html index 65e43eb3..ab91c9ba 100644 --- a/templates/mod/confirm.html +++ b/templates/mod/confirm.html @@ -1,5 +1,5 @@

- {% trans 'Are you sure you want to do that?' %} {% trans 'Click to proceed to' %} ?/{{ request }}. + {% trans 'Are you sure you want to do that?' %} {% trans 'Click to proceed to' %} ?/{{ request }}.

{% trans 'You are probably seeing this message because Javascript being disabled. This is a necessary security measure to prevent CSRF attacks.' %} diff --git a/templates/post/post_controls.html b/templates/post/post_controls.html index de2e1438..108d80b3 100644 --- a/templates/post/post_controls.html +++ b/templates/post/post_controls.html @@ -2,19 +2,19 @@ {% if mod|hasPermission(config.mod.delete, board.uri) %} - {{ config.mod.link_delete }}  + {{ config.mod.link_delete }}  {% endif %} {% if mod|hasPermission(config.mod.deletebyip, board.uri) %} - {{ config.mod.link_deletebyip }}  + {{ config.mod.link_deletebyip }}  {% endif %} {% if mod|hasPermission(config.mod.deletebyip_global, board.uri) %} - {{ config.mod.link_deletebyip_global }}  + {{ config.mod.link_deletebyip_global }}  {% endif %} {% if mod|hasPermission(config.mod.ban, board.uri) %} - {{ config.mod.link_ban }}  + {{ config.mod.link_ban }}  {% endif %} {% if mod|hasPermission(config.mod.bandelete, board.uri) %} - {{ config.mod.link_bandelete }}  + {{ config.mod.link_bandelete }}  {% endif %} {% if not post.thread %}