mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 08:47:45 +02:00
[ticket/12777] Rename extension status functions and add is_configured()
PHPBB3-12777
This commit is contained in:
@@ -515,7 +515,7 @@ class manager
|
||||
* @param string $name Extension name to check NOTE: Can be user input
|
||||
* @return bool Depending on whether or not the extension is available
|
||||
*/
|
||||
public function available($name)
|
||||
public function is_available($name)
|
||||
{
|
||||
return file_exists($this->get_extension_path($name, true));
|
||||
}
|
||||
@@ -526,11 +526,34 @@ class manager
|
||||
* @param string $name Extension name to check
|
||||
* @return bool Depending on whether or not the extension is enabled
|
||||
*/
|
||||
public function enabled($name)
|
||||
public function is_enabled($name)
|
||||
{
|
||||
return isset($this->extensions[$name]) && $this->extensions[$name]['ext_active'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Check to see if a given extension is disabled
|
||||
*
|
||||
* @param string $name Extension name to check
|
||||
* @return bool Depending on whether or not the extension is disabled
|
||||
*/
|
||||
public function is_disabled($name)
|
||||
{
|
||||
return isset($this->extensions[$name]) && !$this->extensions[$name]['ext_active'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Check to see if a given extension is configured
|
||||
*
|
||||
* @param string $name Extension name to check
|
||||
* @return bool Depending on whether or not the extension is configured
|
||||
* @see all_configured()
|
||||
*/
|
||||
public function is_configured($name)
|
||||
{
|
||||
return isset($this->extensions[$name]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Instantiates a \phpbb\finder.
|
||||
*
|
||||
|
Reference in New Issue
Block a user