you don't need
$permissions_this = getpermissions($forum['forumid']);
this is already called eariler in the function in the form
just use $forumperms['canview']
so
if ($permissions_this['canview']) {
becomes
if ($forumperms['canview']) {
this hack also runs 3 extra queries per forum, so if you have a large board with say 40 users online and 50 forums. Then thats 6000 extra queries, they would usually only have to run 2000 to get forum info. This will have a large impact on server load.
|