@@ -56,51 +56,133 @@ use constant STATUS_WORKFLOW => (
5656);
5757
5858sub SETTINGS {
59- return {
59+ return [
6060 # 2005-03-03 travis@sedsystems.ca -- Bug 41972
61- display_quips => { options => [" on" , " off" ], default => " on" },
61+ {
62+ name => ' display_quips' ,
63+ options => [" on" , " off" ],
64+ default => " on" ,
65+ category => ' Searching'
66+ },
6267 # 2005-03-10 travis@sedsystems.ca -- Bug 199048
63- comment_sort_order => { options => [" oldest_to_newest" , " newest_to_oldest" ,
64- " newest_to_oldest_desc_first" ],
65- default => " oldest_to_newest" },
68+ {
69+ name => ' comment_sort_order' ,
70+ options => [" oldest_to_newest" , " newest_to_oldest" , " newest_to_oldest_desc_first" ],
71+ default => " oldest_to_newest" ,
72+ category => ' Bug Editing'
73+ },
6674 # 2005-05-12 bugzilla@glob.com.au -- Bug 63536
67- post_bug_submit_action => { options => [" next_bug" , " same_bug" , " nothing" ],
68- default => " next_bug" },
75+ {
76+ name => ' post_bug_submit_action' ,
77+ options => [" next_bug" , " same_bug" , " nothing" ],
78+ default => " next_bug" ,
79+ category => ' Bug Editing'
80+ },
6981 # 2005-06-29 wurblzap@gmail.com -- Bug 257767
70- csv_colsepchar => { options => [' ,' ,' ;' ], default => ' ,' },
82+ {
83+ name => ' csv_colsepchar' ,
84+ options => [' ,' ,' ;' ],
85+ default => ' ,' ,
86+ category => ' Searching'
87+ },
7188 # 2005-10-26 wurblzap@gmail.com -- Bug 291459
72- zoom_textareas => { options => [" on" , " off" ], default => " on" },
89+ {
90+ name => ' zoom_textareas' ,
91+ options => [" on" , " off" ],
92+ default => " on" ,
93+ category => ' Bug Editing'
94+ },
7395 # 2005-10-21 LpSolit@gmail.com -- Bug 313020
74- per_bug_queries => { options => [' on' , ' off' ], default => ' off' },
96+ {
97+ name => ' per_bug_queries' ,
98+ options => [' on' , ' off' ],
99+ default => ' off' ,
100+ category => ' Searching'
101+ },
75102 # 2006-05-01 olav@bkor.dhs.org -- Bug 7710
76- state_addselfcc => { options => [' always' , ' never' , ' cc_unless_role' ],
77- default => ' cc_unless_role' },
103+ {
104+ name => ' state_addselfcc' ,
105+ options => [' always' , ' never' , ' cc_unless_role' ],
106+ default => ' cc_unless_role' ,
107+ category => ' Bug Editing'
108+ },
78109 # 2006-08-04 wurblzap@gmail.com -- Bug 322693
79- skin => { subclass => ' Skin' , default => ' Dusk' },
110+ {
111+ name => ' skin' ,
112+ subclass => ' Skin' ,
113+ default => ' Dusk' ,
114+ category => ' User Interface'
115+ },
80116 # 2006-12-10 LpSolit@gmail.com -- Bug 297186
81- lang => { subclass => ' Lang' ,
82- default => ${Bugzilla-> languages}[0] },
117+ {
118+ name => ' lang' ,
119+ subclass => ' Lang' ,
120+ default => ${Bugzilla-> languages}[0],
121+ category => ' User Interface'
122+ },
83123 # 2007-07-02 altlist@gmail.com -- Bug 225731
84- quote_replies => { options => [' quoted_reply' , ' simple_reply' , ' off' ],
85- default => " quoted_reply" },
124+ {
125+ name => ' quote_replies' ,
126+ options => [' quoted_reply' , ' simple_reply' , ' off' ],
127+ default => " quoted_reply" ,
128+ category => ' Bug Editing'
129+ },
86130 # 2009-02-01 mozilla@matt.mchenryfamily.org -- Bug 398473
87- comment_box_position => { options => [' before_comments' , ' after_comments' ],
88- default => ' before_comments' },
131+ {
132+ name => ' comment_box_position' ,
133+ options => [' before_comments' , ' after_comments' ],
134+ default => ' before_comments' ,
135+ category => ' Bug Editing'
136+ },
89137 # 2008-08-27 LpSolit@gmail.com -- Bug 182238
90- timezone => { subclass => ' Timezone' , default => ' local' },
138+ {
139+ name => ' timezone' ,
140+ subclass => ' Timezone' ,
141+ default => ' local' ,
142+ category => ' User Interface'
143+ },
91144 # 2011-02-07 dkl@mozilla.com -- Bug 580490
92- quicksearch_fulltext => { options => [' on' , ' off' ], default => ' on' },
145+ {
146+ name => ' quicksearch_fulltext' ,
147+ options => [' on' , ' off' ],
148+ default => ' on' ,
149+ category => ' Searching'
150+ },
93151 # 2011-06-21 glob@mozilla.com -- Bug 589128
94- email_format => { options => [' html' , ' text_only' ],
95- default => ' html' },
152+ {
153+ name => ' email_format' ,
154+ options => [' html' , ' text_only' ],
155+ default => ' html' ,
156+ category => ' Email Notifications'
157+ },
96158 # 2011-06-16 glob@mozilla.com -- Bug 663747
97- bugmail_new_prefix => { options => [' on' , ' off' ], default => ' on' },
159+ {
160+ name => ' bugmail_new_prefix' ,
161+ options => [' on' , ' off' ],
162+ default => ' on' ,
163+ category => ' Email Notifications'
164+ },
98165 # 2013-07-26 joshi_sunil@in.com -- Bug 669535
99- possible_duplicates => { options => [' on' , ' off' ], default => ' on' },
166+ {
167+ name => ' possible_duplicates' ,
168+ options => [' on' , ' off' ],
169+ default => ' on' ,
170+ category => ' User Interface'
171+ },
100172 # 2011-10-11 glob@mozilla.com -- Bug 301656
101- requestee_cc => { options => [' on' , ' off' ], default => ' on' },
102- api_key_only => { options => [' on' , ' off' ], default => ' off' },
103- }
173+ {
174+ name => ' requestee_cc' ,
175+ options => [' on' , ' off' ],
176+ default => ' on' ,
177+ category => ' Reviews and Needinfo'
178+ },
179+ {
180+ name => ' api_key_only' ,
181+ options => [' on' , ' off' ],
182+ default => ' off' ,
183+ category => ' API'
184+ },
185+ ];
104186};
105187
106188use constant SYSTEM_GROUPS => (
@@ -198,12 +280,13 @@ sub update_settings {
198280 print get_text(' install_setting_setup' ), " \n " ;
199281 }
200282
201- my %settings = %{SETTINGS()};
202- foreach my $setting (keys %settings ) {
203- add_setting($setting ,
204- $settings {$setting }-> {options },
205- $settings {$setting }-> {default },
206- $settings {$setting }-> {subclass }, undef ,
283+ my @settings = @{SETTINGS()};
284+ foreach my $setting (@settings ) {
285+ add_setting($setting -> {name },
286+ $setting -> {options },
287+ $setting -> {default },
288+ $setting -> {subclass },
289+ undef ,
207290 !$any_settings );
208291 }
209292}
0 commit comments