Skip to content

Commit d96a45e

Browse files
committed
Move Config Settings to new position in the ACP
1 parent 79f8ed6 commit d96a45e

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

event/listener.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ public function add_googleanalytics_configs($event)
8282
// Load language file
8383
$this->user->add_lang_ext('phpbb/googleanalytics', 'googleanalytics_acp');
8484

85-
// Add a config to the settings mode, after override_user_style
86-
if ($event['mode'] == 'settings' && isset($event['display_vars']['vars']['override_user_style']))
85+
// Add a config to the settings mode, after board_timezone
86+
if ($event['mode'] == 'settings' && isset($event['display_vars']['vars']['board_timezone']))
8787
{
8888
// Store display_vars event in a local variable
8989
$display_vars = $event['display_vars'];
@@ -98,8 +98,8 @@ public function add_googleanalytics_configs($event)
9898
),
9999
);
100100

101-
// Add the new config vars after override_user_style in the display_vars config array
102-
$insert_after = array('after' => 'override_user_style');
101+
// Add the new config vars after board_timezone in the display_vars config array
102+
$insert_after = array('after' => 'board_timezone');
103103
$display_vars['vars'] = phpbb_insert_config_array($display_vars['vars'], $ga_config_vars, $insert_after);
104104

105105
// Update the display_vars event with the new array

tests/event/listener_test.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,13 @@ public function add_googleanalytics_configs_data()
106106
return array(
107107
array( // expected config and mode
108108
'settings',
109-
array('vars' => array('override_user_style' => array())),
110-
array('override_user_style', 'googleanalytics_id'),
109+
array('vars' => array('board_timezone' => array())),
110+
array('board_timezone', 'googleanalytics_id'),
111111
),
112112
array( // unexpected mode
113113
'foobar',
114-
array('vars' => array('override_user_style' => array())),
115-
array('override_user_style'),
114+
array('vars' => array('board_timezone' => array())),
115+
array('board_timezone'),
116116
),
117117
array( // unexpected config
118118
'settings',

tests/functional/google_analytics_test.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ public function test_set_acp_settings()
4747
// Load ACP board settings page
4848
$crawler = self::request('GET', 'adm/index.php?i=acp_board&mode=settings&sid=' . $this->sid);
4949

50-
// Test that GA settings field is found in the correct position (after OVERRIDE_STYLE)
50+
// Test that GA settings field is found in the correct position (after SYSTEM_TIMEZONE)
5151
$nodes = $crawler->filter('#acp_board > fieldset > dl > dt > label')->extract(array('_text'));
5252
foreach ($nodes as $key => $config_name)
5353
{
54-
if (strpos($config_name, $this->lang('OVERRIDE_STYLE')) !== 0)
54+
if (strpos($config_name, $this->lang('SYSTEM_TIMEZONE')) !== 0)
5555
{
5656
continue;
5757
}

0 commit comments

Comments
 (0)