aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2015-10-12 11:06:46 +0200
committerTristan Darricau <tristan.darricau@sensiolabs.com>2015-10-12 11:06:46 +0200
commitd9a4146113865408bccd72194baaf3636e47f2d0 (patch)
tree437d241f3dfac6cbfc88bede5a1563aa90aed0b9 /phpBB/includes
parente603fa56dbfb7ab7ca1b2cc9dfe496068d477f14 (diff)
parent20c0b574212e85eaefb28b027a6bafae46ea8f78 (diff)
downloadforums-d9a4146113865408bccd72194baaf3636e47f2d0.tar
forums-d9a4146113865408bccd72194baaf3636e47f2d0.tar.gz
forums-d9a4146113865408bccd72194baaf3636e47f2d0.tar.bz2
forums-d9a4146113865408bccd72194baaf3636e47f2d0.tar.xz
forums-d9a4146113865408bccd72194baaf3636e47f2d0.zip
Merge pull request #3922 from Senky/ticket/14188
[ticket/14188] Add core.acp_styles_action_before event * Senky/ticket/14188: [ticket/14188] Add core.acp_styles_action_before event
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/acp/acp_styles.php18
1 files changed, 17 insertions, 1 deletions
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php
index a36a6c1ecd..5181b87ecb 100644
--- a/phpBB/includes/acp/acp_styles.php
+++ b/phpBB/includes/acp/acp_styles.php
@@ -56,9 +56,12 @@ class acp_styles
/** @var string */
protected $php_ext;
+ /** @var \phpbb\event\dispatcher_interface */
+ protected $dispatcher;
+
public function main($id, $mode)
{
- global $db, $user, $phpbb_admin_path, $phpbb_root_path, $phpEx, $template, $request, $cache, $auth, $config;
+ global $db, $user, $phpbb_admin_path, $phpbb_root_path, $phpEx, $template, $request, $cache, $auth, $config, $phpbb_dispatcher;
$this->db = $db;
$this->user = $user;
@@ -69,6 +72,7 @@ class acp_styles
$this->config = $config;
$this->phpbb_root_path = $phpbb_root_path;
$this->php_ext = $phpEx;
+ $this->dispatcher = $phpbb_dispatcher;
$this->default_style = $config['default_style'];
$this->styles_path = $this->phpbb_root_path . $this->styles_path_absolute . '/';
@@ -118,6 +122,18 @@ class acp_styles
)
);
+ /**
+ * Run code before ACP styles action execution
+ *
+ * @event core.acp_styles_action_before
+ * @var int id Module ID
+ * @var string mode Active module
+ * @var string action Module that should be run
+ * @since 3.1.7-RC1
+ */
+ $vars = array('id', 'mode', 'action');
+ extract($this->dispatcher->trigger_event('core.acp_styles_action_before', compact($vars)));
+
// Execute actions
switch ($action)
{