aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_search.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2016-10-28 21:06:21 +0200
committerMarc Alexander <admin@m-a-styles.de>2016-10-28 21:06:21 +0200
commitf658e062b2c38127df34dfe1903f1f28946a9ae7 (patch)
tree4c6f6a9b7f926aea4005e4873278ec0e4863b10f /phpBB/includes/acp/acp_search.php
parentb8ef36ddb1b141ad71bd88a2edb8ac088f9b9b74 (diff)
parent85898d3d2c7b5ce61a0f92299e06ceade000c4a8 (diff)
downloadforums-f658e062b2c38127df34dfe1903f1f28946a9ae7.tar
forums-f658e062b2c38127df34dfe1903f1f28946a9ae7.tar.gz
forums-f658e062b2c38127df34dfe1903f1f28946a9ae7.tar.bz2
forums-f658e062b2c38127df34dfe1903f1f28946a9ae7.tar.xz
forums-f658e062b2c38127df34dfe1903f1f28946a9ae7.zip
Merge branch '3.1.x' into 3.2.x
Diffstat (limited to 'phpBB/includes/acp/acp_search.php')
-rw-r--r--phpBB/includes/acp/acp_search.php21
1 files changed, 8 insertions, 13 deletions
diff --git a/phpBB/includes/acp/acp_search.php b/phpBB/includes/acp/acp_search.php
index 9a72162c29..a792ee6b79 100644
--- a/phpBB/includes/acp/acp_search.php
+++ b/phpBB/includes/acp/acp_search.php
@@ -54,10 +54,8 @@ class acp_search
global $config, $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'))
);
}
@@ -253,10 +251,7 @@ class acp_search
}
$submit = $request->is_set_post('submit', false);
- $form_key = 'acp_search';
- add_form_key($form_key);
-
- if (!check_form_key($form_key) && in_array($action, array('delete', 'create')))
+ if (!check_link_hash($request->variable('hash', ''), 'acp_search') && in_array($action, array('create', 'delete')))
{
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
@@ -310,7 +305,7 @@ class acp_search
if (method_exists($this->search, 'delete_index'))
{
// pass a reference to myself so the $search object can make use of save_state() and attributes
- if ($error = $this->search->delete_index($this, append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&mode=$mode&action=delete", false)))
+ if ($error = $this->search->delete_index($this, append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&mode=$mode&action=delete&hash=" . generate_link_hash('acp_search'), false)))
{
$this->state = array('');
$this->save_state();
@@ -353,7 +348,7 @@ class acp_search
{
$totaltime = microtime(true) - $starttime;
$rows_per_second = $row_count / $totaltime;
- meta_refresh(1, append_sid($this->u_action . '&amp;action=delete&amp;skip_rows=' . $post_counter));
+ meta_refresh(1, append_sid($this->u_action . '&amp;action=delete&amp;skip_rows=' . $post_counter . '&amp;hash=' . generate_link_hash('acp_search')));
trigger_error($user->lang('SEARCH_INDEX_DELETE_REDIRECT', (int) $row_count, $post_counter, $rows_per_second));
}
}
@@ -441,7 +436,7 @@ class acp_search
{
$totaltime = microtime(true) - $starttime;
$rows_per_second = $row_count / $totaltime;
- meta_refresh(1, append_sid($this->u_action . '&amp;action=create&amp;skip_rows=' . $post_counter));
+ meta_refresh(1, append_sid($this->u_action . '&amp;action=create&amp;skip_rows=' . $post_counter . '&amp;hash=' . generate_link_hash('acp_search')));
trigger_error($user->lang('SEARCH_INDEX_CREATE_REDIRECT', (int) $row_count, $post_counter) . $user->lang('SEARCH_INDEX_CREATE_REDIRECT_RATE', $rows_per_second));
}
}
@@ -520,7 +515,7 @@ class acp_search
$template->assign_vars(array(
'S_INDEX' => true,
- 'U_ACTION' => $this->u_action,
+ 'U_ACTION' => $this->u_action . '&amp;hash=' . generate_link_hash('acp_search'),
'U_PROGRESS_BAR' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&amp;mode=$mode&amp;action=progress_bar"),
'UA_PROGRESS_BAR' => addslashes(append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&amp;mode=$mode&amp;action=progress_bar")),
));
@@ -529,7 +524,7 @@ class acp_search
{
$template->assign_vars(array(
'S_CONTINUE_INDEXING' => $this->state[1],
- 'U_CONTINUE_INDEXING' => $this->u_action . '&amp;action=' . $this->state[1],
+ 'U_CONTINUE_INDEXING' => $this->u_action . '&amp;action=' . $this->state[1] . '&amp;hash=' . generate_link_hash('acp_search'),
'L_CONTINUE' => ($this->state[1] == 'create') ? $user->lang['CONTINUE_INDEXING'] : $user->lang['CONTINUE_DELETING_INDEX'],
'L_CONTINUE_EXPLAIN' => ($this->state[1] == 'create') ? $user->lang['CONTINUE_INDEXING_EXPLAIN'] : $user->lang['CONTINUE_DELETING_INDEX_EXPLAIN'])
);