mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-11 13:58:54 +00:00
Merge branch 'develop-ascraeus' into develop
This commit is contained in:
commit
acf6eaf8a8
1 changed files with 14 additions and 5 deletions
|
@ -70,11 +70,6 @@ class acp_styles
|
||||||
$action = $this->request->variable('action', '');
|
$action = $this->request->variable('action', '');
|
||||||
$post_actions = array('install', 'activate', 'deactivate', 'uninstall');
|
$post_actions = array('install', 'activate', 'deactivate', 'uninstall');
|
||||||
|
|
||||||
if ($action && in_array($action, $post_actions) && !check_link_hash($request->variable('hash', ''), $action))
|
|
||||||
{
|
|
||||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($post_actions as $key)
|
foreach ($post_actions as $key)
|
||||||
{
|
{
|
||||||
if ($this->request->is_set_post($key))
|
if ($this->request->is_set_post($key))
|
||||||
|
@ -83,6 +78,18 @@ class acp_styles
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The uninstall action uses confirm_box() to verify the validity of the request,
|
||||||
|
// so there is no need to check for a valid token here.
|
||||||
|
if (in_array($action, $post_actions) && $action != 'uninstall')
|
||||||
|
{
|
||||||
|
$is_valid_request = check_link_hash($request->variable('hash', ''), $action) || check_form_key('styles_management');
|
||||||
|
|
||||||
|
if (!$is_valid_request)
|
||||||
|
{
|
||||||
|
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($action != '')
|
if ($action != '')
|
||||||
{
|
{
|
||||||
$this->s_hidden_fields['action'] = $action;
|
$this->s_hidden_fields['action'] = $action;
|
||||||
|
@ -122,6 +129,8 @@ class acp_styles
|
||||||
*/
|
*/
|
||||||
protected function frontend()
|
protected function frontend()
|
||||||
{
|
{
|
||||||
|
add_form_key('styles_management');
|
||||||
|
|
||||||
// Check mode
|
// Check mode
|
||||||
switch ($this->mode)
|
switch ($this->mode)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue