mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-22 00:21:02 +01:00
Merge branch 'prep-release-3.3.6' into 3.3.x
This commit is contained in:
commit
ee56f0fe7d
@ -30,7 +30,6 @@ class manager
|
||||
protected $cache;
|
||||
protected $php_ext;
|
||||
protected $extensions;
|
||||
protected $recently_changed_ext_status;
|
||||
protected $extension_table;
|
||||
protected $phpbb_root_path;
|
||||
protected $cache_name;
|
||||
@ -243,7 +242,6 @@ class manager
|
||||
|
||||
if ($active)
|
||||
{
|
||||
$this->recently_changed_ext_status[$name] = false;
|
||||
$this->router->without_cache();
|
||||
}
|
||||
|
||||
@ -298,7 +296,6 @@ class manager
|
||||
|
||||
if (!$active)
|
||||
{
|
||||
$this->recently_changed_ext_status[$name] = true;
|
||||
$this->router->without_cache();
|
||||
}
|
||||
|
||||
@ -514,13 +511,6 @@ class manager
|
||||
*/
|
||||
public function is_enabled($name)
|
||||
{
|
||||
// The extension has just been enabled and so is not loaded. When asking if it is enabled or
|
||||
// not we should answer no to stay consistent with the status at the beginning of the request.
|
||||
if (isset($this->recently_changed_ext_status[$name]))
|
||||
{
|
||||
return $this->recently_changed_ext_status[$name];
|
||||
}
|
||||
|
||||
return isset($this->extensions[$name]['ext_active']) && $this->extensions[$name]['ext_active'];
|
||||
}
|
||||
|
||||
@ -532,13 +522,6 @@ class manager
|
||||
*/
|
||||
public function is_disabled($name)
|
||||
{
|
||||
// The extension has just been disabled and so is still loaded. When asking if it is disabled or
|
||||
// not we should answer yes to stay consistent with the status at the beginning of the request.
|
||||
if (isset($this->recently_changed_ext_status[$name]))
|
||||
{
|
||||
return $this->recently_changed_ext_status[$name];
|
||||
}
|
||||
|
||||
return isset($this->extensions[$name]['ext_active']) && !$this->extensions[$name]['ext_active'];
|
||||
}
|
||||
|
||||
|
@ -97,9 +97,7 @@ class phpbb_extension_manager_test extends phpbb_database_test_case
|
||||
$this->assertEquals(array('vendor2/foo'), array_keys($this->extension_manager->all_enabled()));
|
||||
$this->extension_manager->enable('vendor2/bar');
|
||||
|
||||
// We should not display the extension as being enabled in the same request
|
||||
$this->assertEquals(array('vendor2/foo'), array_keys($this->extension_manager->all_enabled()));
|
||||
// With a different request we should see the extension as being disabled
|
||||
// We should see the extension as being disabled
|
||||
$this->assertEquals(array('vendor2/bar', 'vendor2/foo'), array_keys($this->create_extension_manager()->all_enabled()));
|
||||
|
||||
$this->assertEquals(array('vendor/moo', 'vendor2/bar', 'vendor2/foo'), array_keys($this->extension_manager->all_configured()));
|
||||
@ -126,10 +124,7 @@ class phpbb_extension_manager_test extends phpbb_database_test_case
|
||||
$this->assertEquals(array('vendor2/foo'), array_keys($this->extension_manager->all_enabled()));
|
||||
$this->extension_manager->disable('vendor2/foo');
|
||||
|
||||
// We should still display the extension as being enabled in the current request
|
||||
$this->assertEquals(array('vendor2/foo'), array_keys($this->extension_manager->all_enabled()));
|
||||
// With a different request we should see the extension as being disabled
|
||||
$this->assertEquals(array(), array_keys($this->create_extension_manager()->all_enabled()));
|
||||
$this->assertEquals([], array_keys($this->extension_manager->all_enabled()));
|
||||
|
||||
$this->assertEquals(array('vendor/moo', 'vendor2/foo'), array_keys($this->extension_manager->all_configured()));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user