aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/acp/acp_search.php2
-rw-r--r--tests/functional/search/base.php12
2 files changed, 7 insertions, 7 deletions
diff --git a/phpBB/includes/acp/acp_search.php b/phpBB/includes/acp/acp_search.php
index 3a77141d98..cc1e5df084 100644
--- a/phpBB/includes/acp/acp_search.php
+++ b/phpBB/includes/acp/acp_search.php
@@ -305,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();
diff --git a/tests/functional/search/base.php b/tests/functional/search/base.php
index 7c201169df..9b80407b5d 100644
--- a/tests/functional/search/base.php
+++ b/tests/functional/search/base.php
@@ -38,7 +38,7 @@ abstract class phpbb_functional_search_base extends phpbb_functional_test_case
$post = $this->create_topic(2, 'Test Topic 1 foosubject', 'This is a test topic posted by the barsearch testing framework.');
- $crawler = self::request('GET', 'adm/index.php?i=acp_search&mode=settings&sid=' . $this->sid . '&hash=' . generate_link_hash('acp_search'));
+ $crawler = self::request('GET', 'adm/index.php?i=acp_search&mode=settings&sid=' . $this->sid);
$form = $crawler->selectButton('Submit')->form();
$values = $form->getValues();
@@ -75,11 +75,11 @@ abstract class phpbb_functional_search_base extends phpbb_functional_test_case
protected function create_search_index()
{
$this->add_lang('acp/search');
- $crawler = self::request('GET', 'adm/index.php?i=acp_search&mode=index&sid=' . $this->sid . '&hash=' . generate_link_hash('acp_search'));
- $form_values = $crawler->selectButton('Delete index')->form()->getValues();
+ $crawler = self::request('GET', 'adm/index.php?i=acp_search&mode=index&sid=' . $this->sid);
+ $form_values = $crawler->selectButton('Create index')->form()->getValues();
$crawler = self::request(
'POST',
- 'adm/index.php?i=acp_search&mode=index&sid=' . $this->sid . '&hash=' . generate_link_hash('acp_search'),
+ 'adm/index.php?i=acp_search&mode=index&hash=' . generate_link_hash('acp_search') . '&sid=' . $this->sid,
array(
'search_type' => $this->search_backend,
'action' => 'create',
@@ -94,11 +94,11 @@ abstract class phpbb_functional_search_base extends phpbb_functional_test_case
protected function delete_search_index()
{
$this->add_lang('acp/search');
- $crawler = self::request('GET', 'adm/index.php?i=acp_search&mode=index&sid=' . $this->sid . '&hash=' . generate_link_hash('acp_search'));
+ $crawler = self::request('GET', 'adm/index.php?i=acp_search&mode=index&sid=' . $this->sid);
$form_values = $crawler->selectButton('Delete index')->form()->getValues();
$crawler = self::request(
'POST',
- 'adm/index.php?i=acp_search&mode=index&sid=' . $this->sid . '&hash=' . generate_link_hash('acp_search'),
+ 'adm/index.php?i=acp_search&mode=index&hash=' . generate_link_hash('acp_search') . '&sid=' . $this->sid,
array(
'search_type' => $this->search_backend,
'action' => 'delete',