phpBB

Code Changes

File: includes/acp/acp_styles.php

  Unmodified   Added   Modified   Removed
Line 258Line 258
	{
// Get list of styles to uninstall
$ids = $this->request_vars('id', 0, true);

	{
// Get list of styles to uninstall
$ids = $this->request_vars('id', 0, true);

 

// Don't remove prosilver, you can still deactivate it.
$sql = 'SELECT style_id
FROM ' . STYLES_TABLE . "
WHERE style_name = '" . $this->db->sql_escape('prosilver') . "'";
$result = $this->db->sql_query($sql);
$prosilver_id = (int) $this->db->sql_fetchfield('style_id');
$this->db->sql_freeresult($result);

if ($prosilver_id && in_array($prosilver_id, $ids))
{
trigger_error($this->user->lang('UNINSTALL_PROSILVER') . adm_back_link($this->u_action), E_USER_WARNING);
}


// Check if confirmation box was submitted
if (confirm_box(true))


// Check if confirmation box was submitted
if (confirm_box(true))

Line 998Line 1011
				'L_ACTION'	=> $this->user->lang['EXPORT']
); */


				'L_ACTION'	=> $this->user->lang['EXPORT']
); */


 
			if ($style['style_name'] !== 'prosilver')
{

			// Uninstall
$actions[] = array(
'U_ACTION' => $this->u_action . '&action=uninstall&hash=' . generate_link_hash('uninstall') . '&id=' . $style['style_id'],
'L_ACTION' => $this->user->lang['STYLE_UNINSTALL']
);

			// Uninstall
$actions[] = array(
'U_ACTION' => $this->u_action . '&action=uninstall&hash=' . generate_link_hash('uninstall') . '&id=' . $style['style_id'],
'L_ACTION' => $this->user->lang['STYLE_UNINSTALL']
);

 
			}


// Preview
$actions[] = array(


// Preview
$actions[] = array(

Line 1123Line 1139
	*/
protected function read_style_cfg($dir)
{

	*/
protected function read_style_cfg($dir)
{

 
		// This should never happen, we give them a red warning because of its relevance.
if (!file_exists($this->styles_path . $dir . '/style.cfg'))
{
trigger_error($this->user->lang('NO_STYLE_CFG', $dir), E_USER_WARNING);
}


		static $required = array('name', 'phpbb_version', 'copyright');

		static $required = array('name', 'phpbb_version', 'copyright');

 


		$cfg = parse_cfg_file($this->styles_path . $dir . '/style.cfg');

// Check if it is a valid file

		$cfg = parse_cfg_file($this->styles_path . $dir . '/style.cfg');

// Check if it is a valid file