phpBB

Code Changes

File: includes/acp/acp_modules.php

  Unmodified   Added   Modified   Removed
Line 45Line 45

$user->add_lang('acp/modules');
$this->tpl_name = 'acp_modules';


$user->add_lang('acp/modules');
$this->tpl_name = 'acp_modules';

 

$form_key = 'acp_modules';
add_form_key($form_key);


// module class
$this->module_class = $mode;


// module class
$this->module_class = $mode;

Line 117Line 120
				if (!$module_id)
{
trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);

				if (!$module_id)
{
trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);

 
				}

if (!check_link_hash($request->variable('hash', ''), 'acp_modules'))
{
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);

				}

$sql = 'SELECT *

				}

$sql = 'SELECT *

Line 148Line 156
				if (!$module_id)
{
trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);

				if (!$module_id)
{
trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);

 
				}

if (!check_link_hash($request->variable('hash', ''), 'acp_modules'))
{
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);

				}

$sql = 'SELECT *

				}

$sql = 'SELECT *

Line 273Line 286

if ($submit)
{


if ($submit)
{

 
					if (!check_form_key($form_key))
{
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
}


					if (!$module_data['module_langname'])
{
trigger_error($user->lang['NO_MODULE_LANGNAME'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);

					if (!$module_data['module_langname'])
{
trigger_error($user->lang['NO_MODULE_LANGNAME'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);

Line 460Line 478
					'S_ACP_MODULE_MANAGEMENT'	=> ($this->module_class == 'acp' && ($row['module_basename'] == 'modules' || $row['module_langname'] == 'ACP_MODULE_MANAGEMENT')) ? true : false,

'U_MODULE' => $this->u_action . '&parent_id=' . $row['module_id'],

					'S_ACP_MODULE_MANAGEMENT'	=> ($this->module_class == 'acp' && ($row['module_basename'] == 'modules' || $row['module_langname'] == 'ACP_MODULE_MANAGEMENT')) ? true : false,

'U_MODULE' => $this->u_action . '&parent_id=' . $row['module_id'],

					'U_MOVE_UP'			=> $url . '&action=move_up',
'U_MOVE_DOWN' => $url . '&action=move_down',

					'U_MOVE_UP'			=> $url . '&action=move_up&hash=' . generate_link_hash('acp_modules'),
'U_MOVE_DOWN' => $url . '&action=move_down&hash=' . generate_link_hash('acp_modules'),

					'U_EDIT'			=> $url . '&action=edit',
'U_DELETE' => $url . '&action=delete',

					'U_EDIT'			=> $url . '&action=edit',
'U_DELETE' => $url . '&action=delete',

					'U_ENABLE'			=> $url . '&action=enable',
'U_DISABLE' => $url . '&action=disable')

					'U_ENABLE'			=> $url . '&action=enable&hash=' . generate_link_hash('acp_modules'),
'U_DISABLE' => $url . '&action=disable&hash=' . generate_link_hash('acp_modules'))

				);
}
while ($row = $db->sql_fetchrow($result));

				);
}
while ($row = $db->sql_fetchrow($result));

Line 484Line 502

'U_EDIT' => $url . '&action=edit',
'U_DELETE' => $url . '&action=delete',


'U_EDIT' => $url . '&action=edit',
'U_DELETE' => $url . '&action=delete',

				'U_ENABLE'			=> $url . '&action=enable',
'U_DISABLE' => $url . '&action=disable')

				'U_ENABLE'			=> $url . '&action=enable&hash=' . generate_link_hash('acp_modules'),
'U_DISABLE' => $url . '&action=disable&hash=' . generate_link_hash('acp_modules'))

			);
}
$db->sql_freeresult($result);

			);
}
$db->sql_freeresult($result);

Line 888Line 906
		$diff = sizeof($moved_modules) * 2;

$moved_ids = array();

		$diff = sizeof($moved_modules) * 2;

$moved_ids = array();

		for ($i = 0; $i < sizeof($moved_modules); ++$i)

		for ($i = 0, $size = sizeof($moved_modules); $i < $size; ++$i)

		{
$moved_ids[] = $moved_modules[$i]['module_id'];
}

		{
$moved_ids[] = $moved_modules[$i]['module_id'];
}