aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrxu <rxu@mail.ru>2016-10-20 00:54:45 +0700
committerrxu <rxu@mail.ru>2016-10-21 01:23:44 +0700
commiteca10dc08f157f27b9a399a132dce7b5fca7c927 (patch)
treebaeb1ed8e1ad6c797bf6967ced44813bf7da78ce
parent8e54c9ef8b44dce40402f191e50a431dd695eef0 (diff)
downloadforums-eca10dc08f157f27b9a399a132dce7b5fca7c927.tar
forums-eca10dc08f157f27b9a399a132dce7b5fca7c927.tar.gz
forums-eca10dc08f157f27b9a399a132dce7b5fca7c927.tar.bz2
forums-eca10dc08f157f27b9a399a132dce7b5fca7c927.tar.xz
forums-eca10dc08f157f27b9a399a132dce7b5fca7c927.zip
[ticket/14830] Fix FORM_INVALID error on search backend changing
PHPBB3-14830
-rw-r--r--phpBB/includes/acp/acp_search.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/phpBB/includes/acp/acp_search.php b/phpBB/includes/acp/acp_search.php
index 69ae442fc7..3a77141d98 100644
--- a/phpBB/includes/acp/acp_search.php
+++ b/phpBB/includes/acp/acp_search.php
@@ -50,14 +50,12 @@ class acp_search
function settings($id, $mode)
{
- global $db, $user, $auth, $template, $cache;
+ global $db, $user, $auth, $template, $cache, $request;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
$submit = (isset($_POST['submit'])) ? true : false;
- $form_key = 'acp_search';
- add_form_key($form_key);
- if ($submit && !check_form_key($form_key))
+ if ($submit && !check_link_hash($request->variable('hash', ''), 'acp_search'))
{
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
@@ -233,7 +231,7 @@ class acp_search
'S_YES_SEARCH' => (bool) $config['load_search'],
'S_SETTINGS' => true,
- 'U_ACTION' => $this->u_action)
+ 'U_ACTION' => $this->u_action . '&amp;hash=' . generate_link_hash('acp_search'))
);
}