Skip to content
This repository has been archived by the owner on Oct 23, 2021. It is now read-only.

Commit

Permalink
Removed unnecessary variable assignment, break out of loop when forum…
Browse files Browse the repository at this point in the history
… found.
  • Loading branch information
Justin Osborne committed May 12, 2012
1 parent 55e345f commit 3dcdcb5
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions cgi-bin/forum/Code/BoardIndex.pl
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -111,14 +111,17 @@ sub Glimpse { # Taken from latest threads in Portal
</item> </item>
EOT EOT
} else { } else {
$mydesc=''; $board_name = '';
foreach (@boardbase) { foreach (@boardbase) {
($bid,$bdisc[0],$bdisc[1],$bdisc[2],$bdisc[3],$bdisc[4],$bdisc[5],$bdisc[6]) = split("/",$_); ($bid,$t,$t,$board_name) = split("/",$_);
if($bid eq $board) { $mydesc=$bdisc[2] } if($bid eq $board) {
last;
}
} }

$lastthread .= <<"EOT"; $lastthread .= <<"EOT";
<td class="win center" style="vertical-align: top;"><div style="padding: 11px; padding-top: 4px;"><img src="$images/$status.png" alt="" /></div></td> <td class="win center" style="vertical-align: top;"><div style="padding: 11px; padding-top: 4px;"><img src="$images/$status.png" alt="" /></div></td>
<td class="win2" style="width: 50%">$new<a href="$surl\lm-$id/$snew" title="$gtxt{'19'} $posted_sn">$title</a>$newend<div class="smalltext">$gtxt{'46'} $lastuser<div class="bidate">$date $boardindex[105] <a href="$surl\lb-$board" title="$mydesc">$mydesc</a></div></div></td> <td class="win2" style="width: 50%">$new<a href="$surl\lm-$id/$snew" title="$gtxt{'19'} $posted_sn">$title</a>$newend<div class="smalltext">$gtxt{'46'} $lastuser<div class="bidate">$date $boardindex[105] <a href="$surl\lb-$board" title="$board_name">$board_name</a></div></div></td>
EOT EOT
} }
++$counter; ++$counter;
Expand Down

0 comments on commit 3dcdcb5

Please sign in to comment.