From 8e8b493fae59aba59e1ea732c1f93d66f59fb640 Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Fri, 27 Jun 2014 11:28:13 +0200 Subject: [ticket/12777] Add is_purged() PHPBB3-12777 --- phpBB/phpbb/extension/manager.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'phpBB/phpbb/extension/manager.php') 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 @@ -556,6 +556,19 @@ class manager return isset($this->extensions[$name]); } + /** + * 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. * -- cgit v1.2.1