(GetTextAtTime): Fix bug for rollback action where only the pages

were rolled back that were changed at the exact moment!
This commit is contained in:
Alex Schroeder
2004-04-12 01:41:08 +00:00
parent 31ac7f62d4
commit db32378d23

View File

@@ -314,7 +314,7 @@ sub InitVariables { # Init global session variables for mod_perl!
}
}
$WikiDescription = $q->p($q->a({-href=>'http://www.oddmuse.org/'}, 'Oddmuse'))
. $q->p('$Id: wiki.pl,v 1.378 2004/04/12 01:16:01 as Exp $');
. $q->p('$Id: wiki.pl,v 1.379 2004/04/12 01:41:08 as Exp $');
$WikiDescription .= $ModulesDescription if $ModulesDescription;
}
@@ -2361,15 +2361,18 @@ sub OpenPage { # Sets global variables
sub GetTextAtTime {
my $ts = shift;
my @keeps = GetKeepFiles($OpenPageName);
my ($maxts, $result);
foreach my $keep (@keeps) {
my ($status, $data) = ReadFile($keep);
next unless $status;
my %field = ParseData($data);
if ($field{ts} == $ts) {
return $field{text};
} elsif ($field{ts} <= $ts and $field{ts} > $maxts) {
$result = $field{text};
}
}
return '';
return $result;
}
sub GetTextRevision {