From d6771d6a7f12067c64f83ca3e249c7fb4084cc90 Mon Sep 17 00:00:00 2001 From: javiexin Date: Fri, 30 Dec 2016 21:43:15 +0100 Subject: [PATCH] [ticket/14849] Add core.acp_extensions_run_action Moved the event to a slightly modified position. Added an extra variable to the event. Additional event to be run after the execution of the action in ACP. Added a new action to allow for extension execution control. PHPBB-14849 --- phpBB/includes/acp/acp_extensions.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php index d41b94b026..2befe57399 100644 --- a/phpBB/includes/acp/acp_extensions.php +++ b/phpBB/includes/acp/acp_extensions.php @@ -72,12 +72,12 @@ class acp_extensions * Event to run a specific action on extension * * @event core.acp_extensions_run_action - * @var string action Action to run + * @var string action Action to run; if the event executes completely the action, should be set to 'none' * @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 - * @var string tpl_name Template file to load; leave empty to continue execution, filled in if ready to finish + * @var string tpl_name Template file to load * @since 3.1.11-RC1 */ $u_action = $this->u_action; @@ -89,12 +89,6 @@ class acp_extensions $this->u_action = $u_action; $this->tpl_name = $tpl_name; - // If tpl_name was set by the prior event, we are done - if ($tpl_name) - { - return; - } - // If they've specified an extension, let's load the metadata manager and validate it. if ($ext_name) { @@ -113,6 +107,10 @@ class acp_extensions // What are we doing? switch ($action) { + case 'none': + // Intentionally empty, used by extensions that execute additional actions in the prior event + break; + case 'set_config_version_check_force_unstable': $force_unstable = $this->request->variable('force_unstable', false);