diff options
| author | Nicofuma <github@nicofuma.fr> | 2015-03-24 23:57:26 +0100 |
|---|---|---|
| committer | Nicofuma <github@nicofuma.fr> | 2015-03-24 23:57:26 +0100 |
| commit | 9e66a10bac61343d0e6b5d4bdf64655578a74dc1 (patch) | |
| tree | 721d31458ec0b17778114ebb13aeea6f6bfbd306 | |
| parent | 9a5aefd4c20da2dcfb17f9a1b447728a6bcef423 (diff) | |
| parent | 50b3c2b49e422aa47986f608c7b109783fc2a4ed (diff) | |
| download | forums-9e66a10bac61343d0e6b5d4bdf64655578a74dc1.tar forums-9e66a10bac61343d0e6b5d4bdf64655578a74dc1.tar.gz forums-9e66a10bac61343d0e6b5d4bdf64655578a74dc1.tar.bz2 forums-9e66a10bac61343d0e6b5d4bdf64655578a74dc1.tar.xz forums-9e66a10bac61343d0e6b5d4bdf64655578a74dc1.zip | |
Merge branch '3.1.x'
| -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 de18fb2cf2..495413593b 100644 --- a/tests/test_framework/phpbb_functional_test_case.php +++ b/tests/test_framework/phpbb_functional_test_case.php @@ -416,6 +416,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(); |
