Diff of /branches/2.5.4/cgi-bin/yabb2/Sources/Recent.pm [r1077] .. [r1078]  Maximize  Restore

Switch to side-by-side view

--- a/branches/2.5.4/cgi-bin/yabb2/Sources/Recent.pm
+++ b/branches/2.5.4/cgi-bin/yabb2/Sources/Recent.pm
@@ -19,7 +19,7 @@
 our $VERSION = '2.5.4';
 
 # from YaBB3.0 build 100 #
-$recentpmver = 'YaBB 2.5.4 $Revision: 1014 $';
+$recentpmver = 'YaBB 2.5.4 $Revision: 1078 $';
 if ( $action eq 'detailedversion' ) { return 1; }
 
 # Sub RecentTopics shows all the most recently posted topics
@@ -47,6 +47,30 @@
 
             my $access = AccessCheck( $curboard, q{}, $boardperms );
             if ( !$iamadmin && $access ne 'granted' ) { next; }
+
+			if (${$uid.$curboard}{'brdpasswr'}) {
+			my $bdmods = ${$uid.$curboard}{'mods'};
+			$bdmods =~ s/\, /\,/g;
+			$bdmods =~ s/\ /\,/g;
+			my %moderators = ();
+			my $pswiammod = 0;
+			foreach my $curuser (split(/\,/, $bdmods)) {
+				if ($username eq $curuser) { $pswiammod = 1; }
+			}
+			my $bdmodgroups = ${$uid.$curboard}{'modgroups'};
+			$bdmodgroups =~ s/\, /\,/g;
+			my %moderatorgroups = ();
+			foreach my $curgroup (split(/\,/, $bdmodgroups)) {
+				if (${$uid.$username}{'position'} eq $curgroup) { $pswiammod = 1; }
+				foreach my $memberaddgroups (split(/\, /, ${$uid.$username}{'addgroups'})) {
+					chomp $memberaddgroups;
+					if ($memberaddgroups eq $curgroup) { $pswiammod = 1; last; }
+				}
+			}
+			my $cookiename = "$cookiepassword$curboard$username";
+			my $crypass = ${$uid.$curboard}{'brdpassw'};
+			if (!$iamadmin && !$iamgmod && !$pswiammod && $yyCookies{$cookiename} ne $crypass) { next; }
+			}
 
             $catid{$curboard}   = $catid;
             $catname{$curboard} = $catname;
@@ -482,6 +506,30 @@
         my $access = AccessCheck( $curboard, q{}, $boardperms );
         if ( !$iamadmin && $access ne 'granted' ) { next; }
 
+			if (${$uid.$curboard}{'brdpasswr'}) {
+			my $bdmods = ${$uid.$curboard}{'mods'};
+			$bdmods =~ s/\, /\,/g;
+			$bdmods =~ s/\ /\,/g;
+			my %moderators = ();
+			my $pswiammod = 0;
+			foreach my $curuser (split(/\,/, $bdmods)) {
+				if ($username eq $curuser) { $pswiammod = 1; }
+			}
+			my $bdmodgroups = ${$uid.$curboard}{'modgroups'};
+			$bdmodgroups =~ s/\, /\,/g;
+			my %moderatorgroups = ();
+			foreach my $curgroup (split(/\,/, $bdmodgroups)) {
+				if (${$uid.$username}{'position'} eq $curgroup) { $pswiammod = 1; }
+				foreach my $memberaddgroups (split(/\, /, ${$uid.$username}{'addgroups'})) {
+					chomp $memberaddgroups;
+					if ($memberaddgroups eq $curgroup) { $pswiammod = 1; last; }
+				}
+			}
+			my $cookiename = "$cookiepassword$curboard$username";
+			my $crypass = ${$uid.$curboard}{'brdpassw'};
+			if (!$iamadmin && !$iamgmod && !$pswiammod && $yyCookies{$cookiename} ne $crypass) { next; }
+			}
+
         $catid{$curboard}   = $catid;
         $catname{$curboard} = $catname;