|
@@ -1110,24 +1110,24 @@ class Install extends Admin
|
|
|
|
|
|
$now = \time();
|
|
|
$groups = [
|
|
|
- // g_id, g_title, g_user_title, g_moderator, g_mod_edit_users, g_mod_rename_users, g_mod_change_passwords, g_mod_ban_users, g_mod_promote_users, g_read_board, g_view_users, g_post_replies, g_post_topics, g_edit_posts, g_delete_posts, g_delete_topics, g_post_links, g_set_title, g_search, g_search_users, g_send_email, g_post_flood, g_search_flood, g_email_flood, g_report_flood, g_promote_min_posts, g_promote_next_group
|
|
|
- [$this->c->GROUP_ADMIN, __('Administrators'), __('Administrator '), 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, ],
|
|
|
- [$this->c->GROUP_MOD, __('Moderators'), __('Moderator '), 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, ],
|
|
|
- [$this->c->GROUP_GUEST, __('Guests'), '', 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 120, 60, 0, 0, 0, 0, ],
|
|
|
- [$this->c->GROUP_MEMBER, __('Members'), '', 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 30, 30, 60, 60, 0, 0, ],
|
|
|
- [$this->c->GROUP_NEW_MEMBER, __('New members'), __('New member'), 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 60, 30, 120, 60, 5, $this->c->GROUP_MEMBER,],
|
|
|
+ // g_id, g_title, g_user_title, g_moderator, g_mod_edit_users, g_mod_rename_users, g_mod_change_passwords, g_mod_ban_users, g_mod_promote_users, g_read_board, g_view_users, g_post_replies, g_post_topics, g_edit_posts, g_delete_posts, g_delete_topics, g_post_links, g_set_title, g_search, g_search_users, g_send_email, g_post_flood, g_search_flood, g_email_flood, g_report_flood, g_promote_min_posts, g_promote_next_group
|
|
|
+ [FORK_GROUP_ADMIN, __('Administrators'), __('Administrator '), 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, ],
|
|
|
+ [FORK_GROUP_MOD, __('Moderators'), __('Moderator '), 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, ],
|
|
|
+ [FORK_GROUP_GUEST, __('Guests'), '', 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 120, 60, 0, 0, 0, 0, ],
|
|
|
+ [FORK_GROUP_MEMBER, __('Members'), '', 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 30, 30, 60, 60, 0, 0, ],
|
|
|
+ [FORK_GROUP_NEW_MEMBER, __('New members'), __('New member'), 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 60, 30, 120, 60, 5, FORK_GROUP_MEMBER, ],
|
|
|
];
|
|
|
|
|
|
foreach ($groups as $group) { //???? $db_type != 'pgsql'
|
|
|
$this->c->DB->exec('INSERT INTO ::groups (g_id, g_title, g_user_title, g_moderator, g_mod_edit_users, g_mod_rename_users, g_mod_change_passwords, g_mod_ban_users, g_mod_promote_users, g_read_board, g_view_users, g_post_replies, g_post_topics, g_edit_posts, g_delete_posts, g_delete_topics, g_post_links, g_set_title, g_search, g_search_users, g_send_email, g_post_flood, g_search_flood, g_email_flood, g_report_flood, g_promote_min_posts, g_promote_next_group) VALUES (?i, ?s, ?s, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i)', $group) ;
|
|
|
}
|
|
|
|
|
|
- $this->c->DB->exec('UPDATE ::groups SET g_pm_limit=0 WHERE g_id=?i', [$this->c->GROUP_ADMIN]);
|
|
|
- $this->c->DB->exec('UPDATE ::groups SET g_pm=0, g_sig_length=0, g_sig_lines=0 WHERE g_id=?i', [$this->c->GROUP_GUEST]);
|
|
|
+ $this->c->DB->exec('UPDATE ::groups SET g_pm_limit=0 WHERE g_id=?i', [FORK_GROUP_ADMIN]);
|
|
|
+ $this->c->DB->exec('UPDATE ::groups SET g_pm=0, g_sig_length=0, g_sig_lines=0 WHERE g_id=?i', [FORK_GROUP_GUEST]);
|
|
|
|
|
|
$ip = \filter_var($_SERVER['REMOTE_ADDR'], \FILTER_VALIDATE_IP) ?: '0.0.0.0';
|
|
|
- $this->c->DB->exec('INSERT INTO ::users (group_id, username, password, signature, u_pm) VALUES (?i, ?s, ?s, \'\', ?i)', [$this->c->GROUP_GUEST, __('Guest '), __('Guest '), 0]);
|
|
|
- $this->c->DB->exec('INSERT INTO ::users (group_id, username, password, email, email_normal, language, style, num_posts, last_post, registered, registration_ip, last_visit, signature, num_topics) VALUES (?i, ?s, ?s, ?s, ?s, ?s, ?s, 1, ?i, ?i, ?s, ?i, \'\', 1)', [$this->c->GROUP_ADMIN, $v->username, password_hash($v->password, \PASSWORD_DEFAULT), $v->email, $this->c->NormEmail->normalize($v->email), $v->defaultlang, $v->defaultstyle, $now, $now, $ip, $now]);
|
|
|
+ $this->c->DB->exec('INSERT INTO ::users (group_id, username, password, signature, u_pm) VALUES (?i, ?s, ?s, \'\', ?i)', [FORK_GROUP_GUEST, __('Guest '), __('Guest '), 0]);
|
|
|
+ $this->c->DB->exec('INSERT INTO ::users (group_id, username, password, email, email_normal, language, style, num_posts, last_post, registered, registration_ip, last_visit, signature, num_topics) VALUES (?i, ?s, ?s, ?s, ?s, ?s, ?s, 1, ?i, ?i, ?s, ?i, \'\', 1)', [FORK_GROUP_ADMIN, $v->username, password_hash($v->password, \PASSWORD_DEFAULT), $v->email, $this->c->NormEmail->normalize($v->email), $v->defaultlang, $v->defaultstyle, $now, $now, $ip, $now]);
|
|
|
|
|
|
$pun_config = [
|
|
|
'i_fork_revision' => $this->c->FORK_REVISION,
|
|
@@ -1144,7 +1144,7 @@ class Install extends Admin
|
|
|
'o_make_links' => 1,
|
|
|
'o_default_lang' => $v->defaultlang,
|
|
|
'o_default_style' => $v->defaultstyle,
|
|
|
- 'i_default_user_group' => $this->c->GROUP_NEW_MEMBER,
|
|
|
+ 'i_default_user_group' => FORK_GROUP_NEW_MEMBER,
|
|
|
'i_topic_review' => 15,
|
|
|
'i_disp_topics_default' => 30,
|
|
|
'i_disp_posts_default' => 25,
|