aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/extension/manager.php
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2014-06-27 10:49:13 +0200
committerTristan Darricau <github@nicofuma.fr>2014-06-27 10:49:13 +0200
commitd13e02c7b100ac43943f11912a8f4acb740f69b6 (patch)
treed1b78f32e676719717f8c97fb26871d621e5fed6 /phpBB/phpbb/extension/manager.php
parent9b27d00d5fc8228ec4f9150aa26bcf450dc45524 (diff)
downloadforums-d13e02c7b100ac43943f11912a8f4acb740f69b6.tar
forums-d13e02c7b100ac43943f11912a8f4acb740f69b6.tar.gz
forums-d13e02c7b100ac43943f11912a8f4acb740f69b6.tar.bz2
forums-d13e02c7b100ac43943f11912a8f4acb740f69b6.tar.xz
forums-d13e02c7b100ac43943f11912a8f4acb740f69b6.zip
[ticket/12777] Rename extension status functions and add is_configured()
PHPBB3-12777
Diffstat (limited to 'phpBB/phpbb/extension/manager.php')
-rw-r--r--phpBB/phpbb/extension/manager.php27
1 files changed, 25 insertions, 2 deletions
diff --git a/phpBB/phpbb/extension/manager.php b/phpBB/phpbb/extension/manager.php
index 4130e8455a..580960ca01 100644
--- a/phpBB/phpbb/extension/manager.php
+++ b/phpBB/phpbb/extension/manager.php
@@ -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,12 +526,35 @@ 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.
*
* @param bool $use_all_available Should we load all extensions, or just enabled ones