1 (edited by chrizz 2008-01-12 00:42)

Topic: All forums search bug (v1.2.16)

Occurs when "All forum search" is disabled for guests and members, but administrator and moderators should be able to perform search in all forums.

Moderators and admins should always be able to search through all forums at once, search.php, line 706:

if ($pun_config['o_search_all_forums'] == '1' || $pun_user['g_id'] < PUN_GUEST)
     echo "\t\t\t\t\t\t\t".'<option value="-1">'.$lang_search['All forums'].'</option>'."\n";

But they can't since this exists on line 125 (still search.php): (well, they can, but only if all forums search is enabled for everyone)

// Search a specific forum?
$forum_sql = ($forum != -1 || ($forum == -1 && $pun_config['o_search_all_forums'] == '0')) ? ' AND t.forum_id = '.$forum : '';

Solution? Well, I did this with row 125:

// Search a specific forum?
$forum_sql = ($forum != -1 || ($forum == -1 && $pun_config['o_search_all_forums'] == '0' && $pun_user['g_id'] >= PUN_GUEST)) ? ' AND t.forum_id = '.$forum : '';

I have not spent any considerable time to 100% confirm that this is a bug, but for what I've seen and tested so far, it is.

Re: All forums search bug (v1.2.16)

Makes sense to me smile

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize

Re: All forums search bug (v1.2.16)

Addressed in changesets 1252/1253

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize