diff options
| author | Nicofuma <github@nicofuma.fr> | 2015-03-24 23:32:29 +0100 |
|---|---|---|
| committer | Nicofuma <github@nicofuma.fr> | 2015-03-24 23:32:29 +0100 |
| commit | 50b3c2b49e422aa47986f608c7b109783fc2a4ed (patch) | |
| tree | b5111f0b08bfe811e0652888249e17ebc9f598aa | |
| parent | 4a08d7457142b4d2ae4ad813cd9880e55c5f7c07 (diff) | |
| parent | 27cfda74fc5085bba8d5baf36450b3f52187dce9 (diff) | |
| download | forums-50b3c2b49e422aa47986f608c7b109783fc2a4ed.tar forums-50b3c2b49e422aa47986f608c7b109783fc2a4ed.tar.gz forums-50b3c2b49e422aa47986f608c7b109783fc2a4ed.tar.bz2 forums-50b3c2b49e422aa47986f608c7b109783fc2a4ed.tar.xz forums-50b3c2b49e422aa47986f608c7b109783fc2a4ed.zip | |
Merge pull request #3398 from marc1706/ticket/13612
[ticket/13612] Run meta refresh until extension is fully enabled
| -rw-r--r-- | phpBB/includes/acp/acp_extensions.php | 5 | ||||
| -rw-r--r-- | tests/test_framework/phpbb_functional_test_case.php | 12 |
2 files changed, 12 insertions, 5 deletions
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php index 89fdc8b863..0c9bc0deab 100644 --- a/phpBB/includes/acp/acp_extensions.php +++ b/phpBB/includes/acp/acp_extensions.php @@ -174,11 +174,6 @@ class acp_extensions trigger_error($user->lang['EXTENSION_NOT_ENABLEABLE'] . adm_back_link($this->u_action), E_USER_WARNING); } - if ($phpbb_extension_manager->is_enabled($ext_name)) - { - redirect($this->u_action); - } - try { while ($phpbb_extension_manager->enable_step($ext_name)) diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php index b6769f08d0..844caa8f54 100644 --- a/tests/test_framework/phpbb_functional_test_case.php +++ b/tests/test_framework/phpbb_functional_test_case.php @@ -410,6 +410,18 @@ class phpbb_functional_test_case extends phpbb_test_case $form = $crawler->selectButton('Enable')->form(); $crawler = self::submit($form); $this->add_lang('acp/extensions'); + + $meta_refresh = $crawler->filter('meta[http-equiv="refresh"]'); + + // Wait for extension to be fully enabled + while (sizeof($meta_refresh)) + { + preg_match('#url=.+/(adm+.+)#', $meta_refresh->attr('content'), $match); + $url = $match[1]; + $crawler = self::request('POST', $url); + $meta_refresh = $crawler->filter('meta[http-equiv="refresh"]'); + } + $this->assertContainsLang('EXTENSION_ENABLE_SUCCESS', $crawler->filter('div.successbox')->text()); $this->logout(); |
