Tags:
create new tag
, view all tags

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

TWiki version: TWikiRelease01Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  

-- 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

ChangeProposalForm
TopicClassification BugReport
TopicSummary Fix: Viewing an old revision using r1.21 format causes incorrect meta data to be retrieved.
CurrentState ReadyForMerge
OutstandingIssues Must be re-verified on DEVELOP head
RelatedTopics

InterestedParties

ProposedFor DakarRelease
TWikiContributors PeterThoeny, CrawfordCurrie
Topic revision: r4 - 13 Feb 2005 - 16:10:12 - SamHasler
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback