Okay, here is a quick fix. I'm not sure if this will be a final fix or not, it may be. The problem is that the way the board file is constucted does not lend itself well to having things shuffled. So, this little fix actually makes sure that eveything is in chronological order and then prints it back to the original file. This process is done anytime you modify a thread's sticky status. This is placed so that files do not have to be opened and written to more than they already are.
Anyway, in the file SetStatus.pl
<Search for>
fopen(CTBFILE, ">$datadir/$ctbid.ctb");
print CTBFILE @ctbfile;
fclose(CTBFILE);
fopen(BOARDFILE, "$boardsdir/$currentboard.txt") || &fatal_error("$txt{'23'} $currentboard.txt", 1);
@boardfile = <BOARDFILE>;
fclose(BOARDFILE);
</Search for>
<Add after>
### Sticky Shimmy Shuffle mod ###
foreach (@boardfile) {
($mnum, $msub, $mname, $memail, $mdate, $mreplies, $musername, $micon, $mstate) = split(/\|/, $_);
if ($mstate =~ /s/i || $mstate =~ /a/i) {push (@stickies, $_);}
else {$Boardorder{$mdate} = $_;}
}
@keys = reverse sort { $a <=> $b } (keys %Boardorder);
foreach (@keys) {
push (@neworder, $Boardorder{$_});
}
push (@stickies, @neworder);
@boardfile = @stickies;
### Sticky Shimmy Shuffle mod end ###
</Add After>
I have tested this and it does resolve the issue.
Thanks for bringing this to my attention.
ap