mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[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
This commit is contained in:
parent
aad13389ce
commit
d6771d6a7f
1 changed files with 6 additions and 8 deletions
|
@ -72,12 +72,12 @@ class acp_extensions
|
||||||
* Event to run a specific action on extension
|
* Event to run a specific action on extension
|
||||||
*
|
*
|
||||||
* @event core.acp_extensions_run_action
|
* @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 u_action Url we are at
|
||||||
* @var string ext_name Extension name from request
|
* @var string ext_name Extension name from request
|
||||||
* @var int safe_time_limit Safe limit of execution time
|
* @var int safe_time_limit Safe limit of execution time
|
||||||
* @var int start_time Start 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
|
* @since 3.1.11-RC1
|
||||||
*/
|
*/
|
||||||
$u_action = $this->u_action;
|
$u_action = $this->u_action;
|
||||||
|
@ -89,12 +89,6 @@ class acp_extensions
|
||||||
$this->u_action = $u_action;
|
$this->u_action = $u_action;
|
||||||
$this->tpl_name = $tpl_name;
|
$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 they've specified an extension, let's load the metadata manager and validate it.
|
||||||
if ($ext_name)
|
if ($ext_name)
|
||||||
{
|
{
|
||||||
|
@ -113,6 +107,10 @@ class acp_extensions
|
||||||
// What are we doing?
|
// What are we doing?
|
||||||
switch ($action)
|
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':
|
case 'set_config_version_check_force_unstable':
|
||||||
$force_unstable = $this->request->variable('force_unstable', false);
|
$force_unstable = $this->request->variable('force_unstable', false);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue