aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_styles.php
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2015-10-12 11:18:14 +0200
committerTristan Darricau <tristan.darricau@sensiolabs.com>2015-10-12 11:18:14 +0200
commit16e731d735f1e5f9325c9ece4cbb56d6484b4d02 (patch)
tree7599d2ee7c46de67916df13783142a2218befebb /phpBB/includes/acp/acp_styles.php
parent1baa8adfe31e60700054736539ef17212dfbefb3 (diff)
parentd9a4146113865408bccd72194baaf3636e47f2d0 (diff)
downloadforums-16e731d735f1e5f9325c9ece4cbb56d6484b4d02.tar
forums-16e731d735f1e5f9325c9ece4cbb56d6484b4d02.tar.gz
forums-16e731d735f1e5f9325c9ece4cbb56d6484b4d02.tar.bz2
forums-16e731d735f1e5f9325c9ece4cbb56d6484b4d02.tar.xz
forums-16e731d735f1e5f9325c9ece4cbb56d6484b4d02.zip
Merge remote-tracking branch 'upstream/3.1.x'
* upstream/3.1.x: [ticket/14188] Add core.acp_styles_action_before event
Diffstat (limited to 'phpBB/includes/acp/acp_styles.php')
-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 de3ca5f787..0cd6633710 100644
--- a/phpBB/includes/acp/acp_styles.php
+++ b/phpBB/includes/acp/acp_styles.php
@@ -62,9 +62,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, $phpbb_container;
+ global $db, $user, $phpbb_admin_path, $phpbb_root_path, $phpEx, $template, $request, $cache, $auth, $config, $phpbb_dispatcher, $phpbb_container;
$this->db = $db;
$this->user = $user;
@@ -76,6 +79,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 . '/';
@@ -125,6 +129,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)
{