diff options
author | Tristan Darricau <github@nicofuma.fr> | 2014-06-27 11:28:13 +0200 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2014-06-27 11:28:13 +0200 |
commit | 8e8b493fae59aba59e1ea732c1f93d66f59fb640 (patch) | |
tree | 679fb293175602cfc391be0938bdb0376a0f9eaf /phpBB/phpbb/extension/manager.php | |
parent | 4d9e451f6037924329336ae3b01990fc7ef5828b (diff) | |
download | forums-8e8b493fae59aba59e1ea732c1f93d66f59fb640.tar forums-8e8b493fae59aba59e1ea732c1f93d66f59fb640.tar.gz forums-8e8b493fae59aba59e1ea732c1f93d66f59fb640.tar.bz2 forums-8e8b493fae59aba59e1ea732c1f93d66f59fb640.tar.xz forums-8e8b493fae59aba59e1ea732c1f93d66f59fb640.zip |
[ticket/12777] Add is_purged()
PHPBB3-12777
Diffstat (limited to 'phpBB/phpbb/extension/manager.php')
-rw-r--r-- | phpBB/phpbb/extension/manager.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/phpBB/phpbb/extension/manager.php b/phpBB/phpbb/extension/manager.php index 95496926eb..b19eb9f8a3 100644 --- a/phpBB/phpbb/extension/manager.php +++ b/phpBB/phpbb/extension/manager.php @@ -557,6 +557,19 @@ class manager } /** + * Check to see if a given extension is purged + * + * An extension is purged if it is available, not enabled and not disabled. + * + * @param string $name Extension name to check + * @return bool Depending on whether or not the extension is purged + */ + public function is_purged($name) + { + return $this->is_available($name) && !$this->is_configured($name); + } + + /** * Instantiates a \phpbb\finder. * * @param bool $use_all_available Should we load all extensions, or just enabled ones |