Skip to content

Commit 82494d7

Browse files
committed
Cleanup things
1 parent 6087cf8 commit 82494d7

File tree

3 files changed

+20
-122
lines changed

3 files changed

+20
-122
lines changed

featherbb/Controller/Install.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public function create_db(array $data)
213213

214214
Container::get('perms')->allowGroup(3, array('board.read', 'users.view', 'search.topics', 'search.users'));
215215
Container::get('perms')->allowGroup(4, array('topic.reply', 'topic.post', 'topic.delete', 'post.delete', 'post.edit', 'email.send'));
216-
Container::get('perms')->allowGroup(2, array('modpanel.*', 'mod.is_mod', 'mod.edit_users', 'mod.rename_users', 'mod.change_passwords', 'mod.promote_users', 'mod.ban_users', 'board.title.set'));
216+
Container::get('perms')->allowGroup(2, array('modpanel.*', 'mod.is_mod', 'mod.edit_users', 'mod.rename_users', 'mod.change_passwords', 'mod.promote_users', 'mod.ban_users', 'user.set_title'));
217217
Container::get('perms')->allowGroup(1, array('board.*'));
218218
// Init preferences
219219
Container::get('prefs')->set(array(

featherbb/Model/Admin/Groups.php

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -172,26 +172,9 @@ public function add_edit_group($groups)
172172
'g_promote_min_posts' => $promote_min_posts,
173173
'g_promote_next_group' => $promote_next_group,
174174
// *** 'g_moderator' => $moderator,
175-
// 'g_mod_edit_users' => $mod_edit_users,
176-
// 'g_mod_rename_users' => $mod_rename_users,
177-
// 'g_mod_change_passwords'=> $mod_change_passwords,
178-
// 'g_mod_ban_users' => $mod_ban_users,
179-
// 'g_mod_promote_users' => $mod_promote_users,
180175
// *** 'g_read_board' => $read_board,
181-
// 'g_view_users' => $view_users,
182-
// 'g_post_replies' => $post_replies,
183-
// 'g_post_topics' => $post_topics,
184-
// 'g_edit_posts' => $edit_posts,
185-
// 'g_delete_posts' => $delete_posts,
186-
// 'g_delete_topics' => $delete_topics,
187-
// 'g_post_links' => $post_links,
188-
// 'g_set_title' => $set_title,
189-
// 'g_search' => $search,
190-
// 'g_search_users' => $search_users,
191-
// 'g_send_email' => $send_email,
192-
// 'g_search_flood' => $search_flood,
193-
// 'g_email_flood' => $email_flood,
194-
// 'g_report_flood' => $report_flood,
176+
// *** 'g_post_replies' => $post_replies,
177+
// *** 'g_post_topics' => $post_topics,
195178
);
196179
$group_preferences = array(
197180
'post.min_interval' => (int) $post_flood,

featherbb/Model/Install.php

Lines changed: 17 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -79,28 +79,6 @@ class Install
7979
`g_user_title` varchar(50) DEFAULT NULL,
8080
`g_promote_min_posts` int(10) unsigned NOT NULL DEFAULT '0',
8181
`g_promote_next_group` int(10) unsigned NOT NULL DEFAULT '0',
82-
`g_moderator` tinyint(1) NOT NULL DEFAULT '0',
83-
`g_mod_edit_users` tinyint(1) NOT NULL DEFAULT '0',
84-
`g_mod_rename_users` tinyint(1) NOT NULL DEFAULT '0',
85-
`g_mod_change_passwords` tinyint(1) NOT NULL DEFAULT '0',
86-
`g_mod_ban_users` tinyint(1) NOT NULL DEFAULT '0',
87-
`g_mod_promote_users` tinyint(1) NOT NULL DEFAULT '0',
88-
`g_read_board` tinyint(1) NOT NULL DEFAULT '1',
89-
`g_view_users` tinyint(1) NOT NULL DEFAULT '1',
90-
`g_post_replies` tinyint(1) NOT NULL DEFAULT '1',
91-
`g_post_topics` tinyint(1) NOT NULL DEFAULT '1',
92-
`g_edit_posts` tinyint(1) NOT NULL DEFAULT '1',
93-
`g_delete_posts` tinyint(1) NOT NULL DEFAULT '1',
94-
`g_delete_topics` tinyint(1) NOT NULL DEFAULT '1',
95-
`g_post_links` tinyint(1) NOT NULL DEFAULT '1',
96-
-- `g_set_title` tinyint(1) NOT NULL DEFAULT '1',
97-
-- `g_search` tinyint(1) NOT NULL DEFAULT '1',
98-
-- `g_search_users` tinyint(1) NOT NULL DEFAULT '1',
99-
-- `g_send_email` tinyint(1) NOT NULL DEFAULT '1',
100-
-- `g_post_flood` smallint(6) NOT NULL DEFAULT '30',
101-
-- `g_search_flood` smallint(6) NOT NULL DEFAULT '30',
102-
-- `g_email_flood` smallint(6) NOT NULL DEFAULT '60',
103-
-- `g_report_flood` smallint(6) NOT NULL DEFAULT '60',
10482
`inherit` text,
10583
PRIMARY KEY (`g_id`)
10684
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;",
@@ -300,100 +278,37 @@ public static function load_default_groups()
300278
'g_id' => 1,
301279
'g_title' => __('Administrators'),
302280
'g_user_title' => __('Administrator'),
303-
'g_moderator' => 0,
304-
'g_mod_edit_users' => 0,
305-
'g_mod_rename_users' => 0,
306-
'g_mod_change_passwords' => 0,
307-
'g_mod_ban_users' => 0,
308-
'g_read_board' => 1,
309-
'g_view_users' => 1,
310-
'g_post_replies' => 1,
311-
'g_post_topics' => 1,
312-
'g_edit_posts' => 1,
313-
'g_delete_posts' => 1,
314-
'g_delete_topics' => 1,
315-
// 'g_set_title' => 1,
316-
// 'g_search' => 1,
317-
// 'g_search_users' => 1,
318-
// 'g_send_email' => 1,
319-
// 'g_post_flood' => 0,
320-
// 'g_search_flood' => 0,
321-
// 'g_email_flood' => 0,
322-
// 'g_report_flood' => 0,
281+
// 'g_moderator' => 1,
282+
// 'g_read_board' => 1,
283+
// 'g_post_replies' => 1,
284+
// 'g_post_topics' => 1,
323285
'inherit' => 'a:1:{i:0;i:2;}');
324286
$groups['Moderators'] = array(
325287
'g_id' => 2,
326288
'g_title' => __('Moderators'),
327289
'g_user_title' => __('Moderator'),
328-
'g_moderator' => 1,
329-
'g_mod_edit_users' => 1,
330-
'g_mod_rename_users' => 1,
331-
'g_mod_change_passwords' => 1,
332-
'g_mod_ban_users' => 1,
333-
'g_read_board' => 1,
334-
'g_view_users' => 1,
335-
'g_post_replies' => 1,
336-
'g_post_topics' => 1,
337-
'g_edit_posts' => 1,
338-
'g_delete_posts' => 1,
339-
'g_delete_topics' => 1,
340-
// 'g_set_title' => 1,
341-
// 'g_search' => 1,
342-
// 'g_search_users' => 1,
343-
// 'g_send_email' => 1,
344-
// 'g_post_flood' => 0,
345-
// 'g_search_flood' => 0,
346-
// 'g_email_flood' => 0,
347-
// 'g_report_flood' => 0,
290+
// 'g_moderator' => 1,
291+
// 'g_read_board' => 1,
292+
// 'g_post_replies' => 1,
293+
// 'g_post_topics' => 1,
348294
'inherit' => 'a:1:{i:0;i:4;}');
349295
$groups['Guests'] = array(
350296
'g_id' => 3,
351297
'g_title' => __('Guests'),
352298
'g_user_title' => __('Guest'),
353-
'g_moderator' => 0,
354-
'g_mod_edit_users' => 0,
355-
'g_mod_rename_users' => 0,
356-
'g_mod_change_passwords' => 0,
357-
'g_mod_ban_users' => 0,
358-
'g_read_board' => 1,
359-
'g_view_users' => 1,
360-
'g_post_replies' => 0,
361-
'g_post_topics' => 0,
362-
'g_edit_posts' => 0,
363-
'g_delete_posts' => 0,
364-
'g_delete_topics' => 0,
365-
// 'g_set_title' => 0,
366-
// 'g_search' => 1,
367-
// 'g_search_users' => 1,
368-
// 'g_send_email' => 0,
369-
// 'g_post_flood' => 60,
370-
// 'g_search_flood' => 30,
371-
// 'g_email_flood' => 0,
372-
// 'g_report_flood' => 0);
299+
// 'g_moderator' => 0,
300+
// 'g_read_board' => 1,
301+
// 'g_post_replies' => 0,
302+
// 'g_post_topics' => 0,
303+
);
373304
$groups['Members'] = array(
374305
'g_id' => 4,
375306
'g_title' => __('Members'),
376307
'g_user_title' => __('Member'),
377-
'g_moderator' => 0,
378-
'g_mod_edit_users' => 0,
379-
'g_mod_rename_users' => 0,
380-
'g_mod_change_passwords' => 0,
381-
'g_mod_ban_users' => 0,
382-
'g_read_board' => 1,
383-
'g_view_users' => 1,
384-
'g_post_replies' => 1,
385-
'g_post_topics' => 1,
386-
'g_edit_posts' => 1,
387-
'g_delete_posts' => 1,
388-
'g_delete_topics' => 1,
389-
// 'g_set_title' => 0,
390-
// 'g_search' => 1,
391-
// 'g_search_users' => 1,
392-
// 'g_send_email' => 1,
393-
// 'g_post_flood' => 60,
394-
// 'g_search_flood' => 30,
395-
// 'g_email_flood' => 60,
396-
// 'g_report_flood' => 60,
308+
// 'g_moderator' => 0,
309+
// 'g_read_board' => 1,
310+
// 'g_post_replies' => 1,
311+
// 'g_post_topics' => 1,
397312
'inherit' => 'a:1:{i:0;i:3;}');
398313

399314
return $groups;

0 commit comments

Comments
 (0)