phpBB

Code Changes

File: includes/acp/acp_styles.php

  Unmodified   Added   Modified   Removed
Line 55Line 55

/** @var string */
protected $php_ext;


/** @var string */
protected $php_ext;

 

/** @var \phpbb\event\dispatcher_interface */
protected $dispatcher;


public function main($id, $mode)
{


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;


$this->db = $db;
$this->user = $user;

Line 69Line 72
		$this->config = $config;
$this->phpbb_root_path = $phpbb_root_path;
$this->php_ext = $phpEx;

		$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 . '/';


$this->default_style = $config['default_style'];
$this->styles_path = $this->phpbb_root_path . $this->styles_path_absolute . '/';

Line 117Line 121
			'S_HIDDEN_FIELDS'	=> build_hidden_fields($this->s_hidden_fields)
)
);

			'S_HIDDEN_FIELDS'	=> build_hidden_fields($this->s_hidden_fields)
)
);

 

/**
* 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)


// Execute actions
switch ($action)

Line 416Line 432
		{
trigger_error($this->user->lang['NO_MATCHING_STYLES_FOUND'] . adm_back_link($this->u_action), E_USER_WARNING);
}

		{
trigger_error($this->user->lang['NO_MATCHING_STYLES_FOUND'] . adm_back_link($this->u_action), E_USER_WARNING);
}

 

// Read style configuration file
$style_cfg = $this->read_style_cfg($style['style_path']);


// Find all available parent styles
$list = $this->find_possible_parents($styles, $id);


// Find all available parent styles
$list = $this->find_possible_parents($styles, $id);

Line 563Line 582
			'STYLE_ID'			=> $style['style_id'],
'STYLE_NAME' => htmlspecialchars($style['style_name']),
'STYLE_PATH' => htmlspecialchars($style['style_path']),

			'STYLE_ID'			=> $style['style_id'],
'STYLE_NAME' => htmlspecialchars($style['style_name']),
'STYLE_PATH' => htmlspecialchars($style['style_path']),

 
			'STYLE_VERSION'		=> htmlspecialchars($style_cfg['style_version']),

			'STYLE_COPYRIGHT'	=> strip_tags($style['style_copyright']),
'STYLE_PARENT' => $style['style_parent_id'],
'S_STYLE_ACTIVE' => $style['style_active'],

			'STYLE_COPYRIGHT'	=> strip_tags($style['style_copyright']),
'STYLE_PARENT' => $style['style_parent_id'],
'S_STYLE_ACTIVE' => $style['style_active'],

Line 995Line 1015

// Assign template variables
$this->template->assign_block_vars('styles_list', $row);


// Assign template variables
$this->template->assign_block_vars('styles_list', $row);

		foreach($actions as $action)

		foreach ($actions as $action)

		{
$this->template->assign_block_vars('styles_list.actions', $action);
}

		{
$this->template->assign_block_vars('styles_list.actions', $action);
}