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. *