Bug: Old revision shows incorrect Meta Data
Viewing an old revision of a topic useing the
r1.21 format for revision number causes incorrect meta data to be retrieved.
- Revision will appear as 1.1
- Author is shown as TWikiGuest
- Time of latest revision is shown
Note that the Date and topic content for the revision appear correctly.
Test case
Environment
--
SamHasler - 09 Sep 2004
Follow up
Fix record
Fix is in
SVN.
Index: TWiki.pm
===================================================================
--- TWiki.pm (revision 1744)
+++ TWiki.pm (working copy)
@@ -154,7 +154,7 @@
# ===========================
# TWiki version:
-$wikiversion = '04 Sep 2004 $Rev$';
+$wikiversion = '16 Sep 2004 $Rev$';
# ===========================
# Key Global variables, required for writeDebug
@@ -2358,6 +2358,7 @@
my $cgiRev = "";
$cgiRev = $cgiQuery->param('rev') if( $cgiQuery );
my $revnum = $cgiRev || extractNameValuePair( $theArgs, "rev" ) || "";
+ $revnum =~ s/r?1\.//; # cut "r" and major
my( $date, $user, $rev, $comment ) = TWiki::Store::getRevisionInfo( $web, $topic, $revnum );
my $wikiName = userToWikiName( $user, 1 );
--
PeterThoeny - 16 Sep 2004
I changed rev numbers to single digits and added consistent code to interpret the variants (r1, r1.1, 1.1)
--
CrawfordCurrie - 13 Feb 2005