Skip to content

Commit f159d15

Browse files
committed
Migrate g_set_title
1 parent c00cf05 commit f159d15

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

featherbb/Controller/Profile.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public function display($req, $res, $args)
125125
View::addTemplate('profile/menu.php', 5)->addTemplate('profile/section_essentials.php')->display();
126126

127127
} elseif ($args['section'] == 'personal') {
128-
if (User::get()->g_set_title == '1') {
128+
if (User::getPref('user.set_title') == '1') {
129129
$title_field = '<label>'.__('Title').' <em>('.__('Leave blank').')</em><br /><input type="text" name="title" value="'.Utils::escape($user['title']).'" size="30" maxlength="50" /><br /></label>'."\n";
130130
}
131131

featherbb/Model/Admin/Groups.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ public function add_edit_group($groups)
179179
'g_delete_posts' => $delete_posts,
180180
'g_delete_topics' => $delete_topics,
181181
'g_post_links' => $post_links,
182-
'g_set_title' => $set_title,
183182
);
184183
$new_insert_update_group = array(
185184
'mod.is_mod' => (int) $moderator,
@@ -190,6 +189,7 @@ public function add_edit_group($groups)
190189
'email.min_interval' => (int) $email_flood,
191190
'email.send' => (int) $send_email,
192191
'report.min_interval' => (int) $search_flood,
192+
'user.set_title' => (int) $set_title,
193193
);
194194

195195
$insert_update_group = Container::get('hooks')->fire('model.admin.groups.add_edit_group_data', $insert_update_group);

featherbb/Model/Install.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class Install
9393
`g_delete_posts` tinyint(1) NOT NULL DEFAULT '1',
9494
`g_delete_topics` tinyint(1) NOT NULL DEFAULT '1',
9595
`g_post_links` tinyint(1) NOT NULL DEFAULT '1',
96-
`g_set_title` tinyint(1) NOT NULL DEFAULT '1',
96+
-- `g_set_title` tinyint(1) NOT NULL DEFAULT '1',
9797
-- `g_search` tinyint(1) NOT NULL DEFAULT '1',
9898
-- `g_search_users` tinyint(1) NOT NULL DEFAULT '1',
9999
-- `g_send_email` tinyint(1) NOT NULL DEFAULT '1',
@@ -312,7 +312,7 @@ public static function load_default_groups()
312312
'g_edit_posts' => 1,
313313
'g_delete_posts' => 1,
314314
'g_delete_topics' => 1,
315-
'g_set_title' => 1,
315+
// 'g_set_title' => 1,
316316
// 'g_search' => 1,
317317
// 'g_search_users' => 1,
318318
// 'g_send_email' => 1,
@@ -337,7 +337,7 @@ public static function load_default_groups()
337337
'g_edit_posts' => 1,
338338
'g_delete_posts' => 1,
339339
'g_delete_topics' => 1,
340-
'g_set_title' => 1,
340+
// 'g_set_title' => 1,
341341
// 'g_search' => 1,
342342
// 'g_search_users' => 1,
343343
// 'g_send_email' => 1,
@@ -362,7 +362,7 @@ public static function load_default_groups()
362362
'g_edit_posts' => 0,
363363
'g_delete_posts' => 0,
364364
'g_delete_topics' => 0,
365-
'g_set_title' => 0,
365+
// 'g_set_title' => 0,
366366
// 'g_search' => 1,
367367
// 'g_search_users' => 1,
368368
// 'g_send_email' => 0,
@@ -386,7 +386,7 @@ public static function load_default_groups()
386386
'g_edit_posts' => 1,
387387
'g_delete_posts' => 1,
388388
'g_delete_topics' => 1,
389-
'g_set_title' => 0,
389+
// 'g_set_title' => 0,
390390
// 'g_search' => 1,
391391
// 'g_search_users' => 1,
392392
// 'g_send_email' => 1,

featherbb/Model/Profile.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ public function update_profile($id, $info, $section)
773773

774774
if (User::get()->g_id == ForumEnv::get('FEATHER_ADMIN')) {
775775
$form['title'] = Utils::trim(Input::post('title'));
776-
} elseif (User::get()->g_set_title == '1') {
776+
} elseif (User::getPref('user.set_title') == '1') {
777777
$form['title'] = Utils::trim(Input::post('title'));
778778

779779
if ($form['title'] != '') {

0 commit comments

Comments
 (0)