mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Merge pull request #3398 from marc1706/ticket/13612
[ticket/13612] Run meta refresh until extension is fully enabled
This commit is contained in:
commit
50b3c2b49e
2 changed files with 12 additions and 5 deletions
|
@ -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))
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue