Skip to content

Commit e38ce56

Browse files
committed
Migrate g_search_users
1 parent 1dc602b commit e38ce56

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

featherbb/Controller/Userlist.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function display($req, $res, $args)
3333
// Determine if we are allowed to view post counts
3434
$show_post_count = (ForumSettings::get('o_show_post_count') == '1' || User::get()->is_admmod) ? true : false;
3535

36-
$username = Input::query('username') && User::get()->g_search_users == '1' ? Utils::trim(Input::query('username')) : '';
36+
$username = Input::query('username') && User::getPref('search.users') == '1' ? Utils::trim(Input::query('username')) : '';
3737
$show_group = Input::query('show_group') ? intval(Input::query('show_group')) : -1;
3838
$sort_by = Input::query('sort_by') && (in_array(Input::query('sort_by'), array('username', 'registered')) || (Input::query('sort_by') == 'num_posts' && $show_post_count)) ? Input::query('sort_by') : 'username';
3939
$sort_dir = Input::query('sort_dir') && Input::query('sort_dir') == 'DESC' ? 'DESC' : 'ASC';

featherbb/Model/Admin/Groups.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,16 +181,15 @@ public function add_edit_group($groups)
181181
'g_post_links' => $post_links,
182182
'g_set_title' => $set_title,
183183
'g_search' => $search,
184-
'g_search_users' => $search_users,
185184
);
186185
$new_insert_update_group = array(
187186
'mod.is_mod' => (int) $moderator,
188187
'post.min_interval' => (int) $post_flood,
189188
'search.min_interval' => (int) $search_flood,
189+
'search.users' => (int) $search_users,
190190
'email.min_interval' => (int) $email_flood,
191191
'email.send' => (int) $send_email,
192192
'report.min_interval' => (int) $search_flood,
193-
194193
);
195194

196195
$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
@@ -95,7 +95,7 @@ class Install
9595
`g_post_links` tinyint(1) NOT NULL DEFAULT '1',
9696
`g_set_title` tinyint(1) NOT NULL DEFAULT '1',
9797
`g_search` tinyint(1) NOT NULL DEFAULT '1',
98-
`g_search_users` tinyint(1) NOT NULL DEFAULT '1',
98+
-- `g_search_users` tinyint(1) NOT NULL DEFAULT '1',
9999
-- `g_send_email` tinyint(1) NOT NULL DEFAULT '1',
100100
-- `g_post_flood` smallint(6) NOT NULL DEFAULT '30',
101101
-- `g_search_flood` smallint(6) NOT NULL DEFAULT '30',
@@ -314,7 +314,7 @@ public static function load_default_groups()
314314
'g_delete_topics' => 1,
315315
'g_set_title' => 1,
316316
'g_search' => 1,
317-
'g_search_users' => 1,
317+
// 'g_search_users' => 1,
318318
// 'g_send_email' => 1,
319319
// 'g_post_flood' => 0,
320320
// 'g_search_flood' => 0,
@@ -339,7 +339,7 @@ public static function load_default_groups()
339339
'g_delete_topics' => 1,
340340
'g_set_title' => 1,
341341
'g_search' => 1,
342-
'g_search_users' => 1,
342+
// 'g_search_users' => 1,
343343
// 'g_send_email' => 1,
344344
// 'g_post_flood' => 0,
345345
// 'g_search_flood' => 0,
@@ -364,7 +364,7 @@ public static function load_default_groups()
364364
'g_delete_topics' => 0,
365365
'g_set_title' => 0,
366366
'g_search' => 1,
367-
'g_search_users' => 1,
367+
// 'g_search_users' => 1,
368368
// 'g_send_email' => 0,
369369
// 'g_post_flood' => 60,
370370
// 'g_search_flood' => 30,
@@ -388,7 +388,7 @@ public static function load_default_groups()
388388
'g_delete_topics' => 1,
389389
'g_set_title' => 0,
390390
'g_search' => 1,
391-
'g_search_users' => 1,
391+
// 'g_search_users' => 1,
392392
// 'g_send_email' => 1,
393393
// 'g_post_flood' => 60,
394394
// 'g_search_flood' => 30,

featherbb/View/userlist.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<fieldset>
2626
<legend><?php _e('User find legend') ?></legend>
2727
<div class="infldset">
28-
<?php if (User::get()->g_search_users == '1'): ?> <label class="conl"><?php _e('Username') ?><br /><input type="text" name="username" value="<?= Utils::escape($username) ?>" size="25" maxlength="25" autofocus /><br /></label>
28+
<?php if (User::getPref('search.users') == '1'): ?> <label class="conl"><?php _e('Username') ?><br /><input type="text" name="username" value="<?= Utils::escape($username) ?>" size="25" maxlength="25" autofocus /><br /></label>
2929
<?php endif; ?> <label class="conl"><?php _e('User group')."\n" ?>
3030
<br /><select name="show_group">
3131
<option value="-1"<?php if ($show_group == -1) {
@@ -57,7 +57,7 @@
5757
} ?>><?php _e('Descending') ?></option>
5858
</select>
5959
<br /></label>
60-
<p class="clearb"><?php echo(User::get()->g_search_users == '1' ? __('User search info').' ' : '').__('User sort info'); ?></p>
60+
<p class="clearb"><?php echo(User::getPref('search.users') == '1' ? __('User search info').' ' : '').__('User sort info'); ?></p>
6161
</div>
6262
</fieldset>
6363
</div>

0 commit comments

Comments
 (0)