aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Senko <jakubsenko@gmail.com>2016-11-02 10:10:33 +0100
committerJakub Senko <jakubsenko@gmail.com>2016-11-13 22:34:28 +0100
commitb80b624551583e3223e5e035dd166a8c6094c649 (patch)
tree54926ef2b59736d49b1e8aebdf785aeccfcd1583
parent85898d3d2c7b5ce61a0f92299e06ceade000c4a8 (diff)
downloadforums-b80b624551583e3223e5e035dd166a8c6094c649.tar
forums-b80b624551583e3223e5e035dd166a8c6094c649.tar.gz
forums-b80b624551583e3223e5e035dd166a8c6094c649.tar.bz2
forums-b80b624551583e3223e5e035dd166a8c6094c649.tar.xz
forums-b80b624551583e3223e5e035dd166a8c6094c649.zip
[ticket/14849] Add core.acp_extensions_run_action
PHPBB3-14849
-rw-r--r--phpBB/includes/acp/acp_extensions.php18
1 files changed, 17 insertions, 1 deletions
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index f97711d69d..5a2ded91e2 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -34,7 +34,7 @@ class acp_extensions
function main()
{
// Start the page
- global $config, $user, $template, $request, $phpbb_extension_manager, $db, $phpbb_root_path, $phpEx, $phpbb_log, $cache;
+ global $config, $user, $template, $request, $phpbb_extension_manager, $db, $phpbb_root_path, $phpEx, $phpbb_log, $cache, $phpbb_dispatcher;
$this->db = $db;
$this->config = $config;
@@ -43,6 +43,7 @@ class acp_extensions
$this->cache = $cache;
$this->request = $request;
$this->log = $phpbb_log;
+ $this->phpbb_dispatcher = $phpbb_dispatcher;
$user->add_lang(array('install', 'acp/extensions', 'migrator'));
@@ -55,6 +56,21 @@ class acp_extensions
$safe_time_limit = (ini_get('max_execution_time') / 2);
$start_time = time();
+ /**
+ * Event to run a specific action on extension
+ *
+ * @event core.acp_extensions_run_action
+ * @var string action Action to run
+ * @var string u_action Url we are at
+ * @var string ext_name Extension name from request
+ * @var int safe_time_limit Safe limit of execution time
+ * @var int start_time Start time
+ * @since 3.1.11-RC1
+ */
+ $u_action = $this->u_action;
+ $vars = array('action', 'u_action', 'ext_name', 'safe_time_limit', 'start_time');
+ extract($this->phpbb_dispatcher->trigger_event('core.acp_extensions_run_action', compact($vars)));
+
// Cancel action
if ($request->is_set_post('cancel'))
{