aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/extension
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/extension')
-rw-r--r--phpBB/includes/extension/controller.php84
-rw-r--r--phpBB/includes/extension/controller_interface.php31
-rw-r--r--phpBB/includes/extension/manager.php14
-rw-r--r--phpBB/includes/extension/metadata_manager.php4
4 files changed, 9 insertions, 124 deletions
diff --git a/phpBB/includes/extension/controller.php b/phpBB/includes/extension/controller.php
deleted file mode 100644
index f97b69c7ed..0000000000
--- a/phpBB/includes/extension/controller.php
+++ /dev/null
@@ -1,84 +0,0 @@
-<?php
-/**
-*
-* @package extension
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
-*
-*/
-
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
-* Abstract class extended by extension front controller classes
-*
-* @package extension
-*/
-abstract class phpbb_extension_controller implements phpbb_extension_controller_interface
-{
- /**
- * Request class object
- * @var phpbb_request
- */
- protected $request;
-
- /**
- * DBAL class object
- * @var dbal
- */
- protected $db;
-
- /**
- * User class object
- * @var phpbb_user
- */
- protected $user;
-
- /**
- * Template class object
- * @var phpbb_template
- */
- protected $template;
-
- /**
- * Config object
- * @var phpbb_config
- */
- protected $config;
-
- /**
- * PHP Extension
- * @var string
- */
- protected $php_ext;
-
- /**
- * Relative path to board root
- * @var string
- */
- protected $phpbb_root_path;
-
- /**
- * Constructor method that provides the common phpBB objects as inherited class
- * properties for automatic availability in extension controllers
- */
- public function __construct()
- {
- global $request, $db, $user, $template, $config;
- global $phpEx, $phpbb_root_path;
-
- $this->request = $request;
- $this->db = $db;
- $this->user = $user;
- $this->template = $template;
- $this->config = $config;
- $this->php_ext = $phpEx;
- $this->phpbb_root_path = $phpbb_root_path;
- }
-}
diff --git a/phpBB/includes/extension/controller_interface.php b/phpBB/includes/extension/controller_interface.php
deleted file mode 100644
index 2b88925388..0000000000
--- a/phpBB/includes/extension/controller_interface.php
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-/**
-*
-* @package extension
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
-*
-*/
-
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
-* The interface that extension classes have to implement to run front pages
-*
-* @package extension
-*/
-interface phpbb_extension_controller_interface
-{
- /**
- * Handle the request to display a page from an extension
- *
- * @return null
- */
- public function handle();
-}
diff --git a/phpBB/includes/extension/manager.php b/phpBB/includes/extension/manager.php
index cfa6a0e000..67cc81e407 100644
--- a/phpBB/includes/extension/manager.php
+++ b/phpBB/includes/extension/manager.php
@@ -34,7 +34,7 @@ class phpbb_extension_manager
/**
* Creates a manager and loads information from database
*
- * @param dbal $db A database connection
+ * @param phpbb_db_driver $db A database connection
* @param phpbb_config $config phpbb_config
* @param string $extension_table The name of the table holding extensions
* @param string $phpbb_root_path Path to the phpbb includes directory.
@@ -42,7 +42,7 @@ class phpbb_extension_manager
* @param phpbb_cache_driver_interface $cache A cache instance or null
* @param string $cache_name The name of the cache variable, defaults to _ext
*/
- public function __construct(dbal $db, phpbb_config $config, $extension_table, $phpbb_root_path, $php_ext = '.php', phpbb_cache_driver_interface $cache = null, $cache_name = '_ext')
+ public function __construct(phpbb_db_driver $db, phpbb_config $config, $extension_table, $phpbb_root_path, $php_ext = '.php', phpbb_cache_driver_interface $cache = null, $cache_name = '_ext')
{
$this->phpbb_root_path = $phpbb_root_path;
$this->db = $db;
@@ -195,7 +195,7 @@ class phpbb_extension_manager
if ($this->cache)
{
- $this->cache->destroy($this->cache_name);
+ $this->cache->purge();
}
return !$active;
@@ -252,7 +252,7 @@ class phpbb_extension_manager
if ($this->cache)
{
- $this->cache->destroy($this->cache_name);
+ $this->cache->purge();
}
return true;
@@ -272,7 +272,7 @@ class phpbb_extension_manager
if ($this->cache)
{
- $this->cache->destroy($this->cache_name);
+ $this->cache->purge();
}
return false;
@@ -335,7 +335,7 @@ class phpbb_extension_manager
if ($this->cache)
{
- $this->cache->destroy($this->cache_name);
+ $this->cache->purge();
}
return true;
@@ -349,7 +349,7 @@ class phpbb_extension_manager
if ($this->cache)
{
- $this->cache->destroy($this->cache_name);
+ $this->cache->purge();
}
return false;
diff --git a/phpBB/includes/extension/metadata_manager.php b/phpBB/includes/extension/metadata_manager.php
index ea85bd3c4e..36b0f8b184 100644
--- a/phpBB/includes/extension/metadata_manager.php
+++ b/phpBB/includes/extension/metadata_manager.php
@@ -34,12 +34,12 @@ class phpbb_extension_metadata_manager
/**
* Creates the metadata manager
*
- * @param dbal $db A database connection
+ * @param phpbb_db_driver $db A database connection
* @param string $extension_manager An instance of the phpbb extension manager
* @param string $phpbb_root_path Path to the phpbb includes directory.
* @param string $phpEx php file extension
*/
- public function __construct($ext_name, dbal $db, phpbb_extension_manager $extension_manager, $phpbb_root_path, $phpEx = '.php', phpbb_template $template, phpbb_config $config)
+ public function __construct($ext_name, phpbb_db_driver $db, phpbb_extension_manager $extension_manager, $phpbb_root_path, $phpEx = '.php', phpbb_template $template, phpbb_config $config)
{
$this->phpbb_root_path = $phpbb_root_path;
$this->db = $db;