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

  Switch to side-by-side view

--- a/branches/2.5.4/cgi-bin/yabb2/Sources/Load.pm
+++ b/branches/2.5.4/cgi-bin/yabb2/Sources/Load.pm
@@ -15,7 +15,7 @@
 use CGI::Carp qw(fatalsToBrowser);
 our $VERSION = '2.5.4';
 
-$loadpmver = 'YaBB 2.5.4 $Revision: 1014 $';
+$loadpmver = 'YaBB 2.5.4 $Revision: 1078 $';
 
 sub LoadBoardControl {
     $binboard = q{};
@@ -37,7 +37,7 @@
             $cntrbin,        $cntattperms,     $cntminageperms,
             $cntmaxageperms, $cntgenderperms,  $cntcanpost,
             $cntparent,      $rules,           $rulestitle,
-            $rulesdesc,      $rulescollapse
+            $rulesdesc,      $rulescollapse,   $brdpasswr, $brdpassw
         ) = split /\|/xsm, $boardline;
 		## create a global boards array
         push @allboards, $cntboard;
@@ -67,6 +67,8 @@
             'rulestitle'    => $rulestitle,
             'rulesdesc'     => $rulesdesc,
             'rulescollapse' => $rulescollapse,
+			'brdpasswr'     => $brdpasswr,
+			'brdpassw'      => $brdpassw,
         );
 		if ($cntann == 1)  { $annboard = $cntboard; }
 		if ($cntrbin == 1) { $binboard = $cntboard; }
@@ -348,14 +350,14 @@
                 $cntzero,        $cntpassword,    $cnttotals,
                 $cntattperms,    $spare,          $cntminageperms,
                 $cntmaxageperms, $cntgenderperms, $rules,
-                $rulestitle,     $rulesdesc,      $rulescollapse
+                $rulestitle,     $rulesdesc,      $rulescollapse, $brdpasswr, $brdpassw
             ) = split /\|/xsm, $boardline;
             foreach ( split /, /sm, $cntmods ) {
                 if ( $killmod ne $_ ) { push @newmods, $_; }
 			}
             $cntmods = join q{, }, @newmods;
             push @boardcontrol,
-"$cntcat|$cntboard|$cntpic|$cntdescription|$cntmods|$cntmodgroups|$cnttopicperms|$cntreplyperms|$cntpollperms|$cntzero|$cntpassword|$cnttotals|$cntattperms|$spare|$cntminageperms|$cntmaxageperms|$cntgenderperms|$rules|$rulestitle|$rulesdesc|$rulescollapse\n";
+"$cntcat|$cntboard|$cntpic|$cntdescription|$cntmods|$cntmodgroups|$cnttopicperms|$cntreplyperms|$cntpollperms|$cntzero|$cntpassword|$cnttotals|$cntattperms|$spare|$cntminageperms|$cntmaxageperms|$cntgenderperms|$rules|$rulestitle|$rulesdesc|$rulescollapse|$brdpasswr|$brdpassw\n";
 		}
 	}
 	seek FORUMCONTROL, 0, 0;
@@ -390,14 +392,14 @@
                 $cntzero,        $cntpassword,    $cnttotals,
                 $cntattperms,    $spare,          $cntminageperms,
                 $cntmaxageperms, $cntgenderperms, $rules,
-                $rulestitle,     $rulesdesc,      $rulescollapse
+                $rulestitle,     $rulesdesc,      $rulescollapse, $brdpasswr, $brdpassw
             ) = split /\|/xsm, $boardline;
             foreach ( split /, /sm, $cntmodgroups ) {
                 if ( $killmod ne $_ ) { push @newmods, $_; }
 			}
             $cntmodgroups = join q{, }, @newmods;
             push @boardcontrol,
-"$cntcat|$cntboard|$cntpic|$cntdescription|$cntmods|$cntmodgroups|$cnttopicperms|$cntreplyperms|$cntpollperms|$cntzero|$cntpassword|$cnttotals|$cntattperms|$spare|$cntminageperms|$cntmaxageperms|$cntgenderperms|$rules|$rulestitle|$rulesdesc|$rulescollapse\n";
+"$cntcat|$cntboard|$cntpic|$cntdescription|$cntmods|$cntmodgroups|$cnttopicperms|$cntreplyperms|$cntpollperms|$cntzero|$cntpassword|$cnttotals|$cntattperms|$spare|$cntminageperms|$cntmaxageperms|$cntgenderperms|$rules|$rulestitle|$rulesdesc|$rulescollapse|$brdpasswr|$brdpassw\n";
 		}
 	}
 	seek FORUMCONTROL, 0, 0;
@@ -564,7 +566,7 @@
             ? "$imagesdir/$default_userpic"
             : "$facesurl/${$uid.$user}{'userpic'}"
           )
-          . q~" name="avatar_img_resize" alt="" style="display:none" />~;
+          . q~" id="avatar_img_resize" alt="" style="display:none" />~;
           if ( !$iamguest ) { ${ $uid . $user }{'userpic'} = qq~<a href="$scripturl?action=viewprofile;username=$useraccount{$user}">${ $uid . $user }{'userpic'}</a>~; }
           ${ $uid . $user }{'userpic'} .= q~<br />~; 
     }
@@ -1068,6 +1070,15 @@
 						-path    =>   q{/},
 						-expires =>   'Thursday, 01-Jan-1970 00:00:00 GMT');
 					$yyCookies{$tsortcookie} = q{};
+				}
+				my $cookiename = "$cookiepassword$curboard$username";
+				if ($yyCookies{$cookiename}) {
+					push @otherCookies, write_cookie(
+						-name    =>   "$cookiename",
+						-value   =>   q{},
+						-path    =>   q{/},
+						-expires =>   "Thursday, 01-Jan-1970 00:00:00 GMT");
+					$yyCookies{$cookiename} = q{};
 				}
 			}
 		}