You are here: Foswiki>Tasks Web>Item11607 (06 Jul 2015, GeorgeClark)Edit Attach

Item11607: REVARG and REVTITLE are undocumented macros, and expanded as both a macro and a formatting token

pencil
Priority: Normal
Current State: No Action Required
Released In: n/a
Target Release: n/a
Applies To: Engine
Component: Documentation, FoswikiUIRDiff, FoswikiUIView, REVARG, REVTITLE
Branches:
Reported By: GeorgeClark
Waiting For:
Last Change By: GeorgeClark
Foswiki::Macros::REVARG and Foswiki::Macros::REVTITLE are undocumented macros, and are redundantly expanded as SkinTemplateTokens.

$: /var/www/foswiki/trunk/core/lib (master)$ grep -r %REVARG% *

Foswiki/UI/View.pm:    $tmpl =~ s/%REVARG%/$revArg/g;

$: /var/www/foswiki/trunk/core/lib (master)$ grep -r %REVTITLE% *
                                                                                                                                              
Foswiki/UI/View.pm:    $tmpl =~ s/%REVTITLE%/$revTitle/g;
Foswiki/UI/RDiff.pm:            $tailResult =~ s/%REVTITLE%/$revTitle/go;
Foswiki/Contrib/MailerContrib.pm:    $tmpl =~ s/%REVTITLE%//g;

I suspect that they should either be macros, or template tokens, not both, otherwise it's possible to get inconsistent results. Also changes to sanitize the macros needs to be kept consistent with the code in the scripts.

Finally not sure if it's a bug, but if an invalid but legal rev. is requested, it's displayed. It should probably match the actual displayed revision and not the requested revision when the requested rev. doesn't exist.

Note also that the compare and rdiff scripts use modified versions as Template Tokens - REVTITLE1 and REVTITLE2

-- GeorgeClark - 05 Mar 2012

Added the documentation for REVARG and REVTITLE under task Item11383.

-- GeorgeClark - 07 Mar 2012

Removed MailerContrib from the component list, because it isn't relevant.

-- CrawfordCurrie - 25 Mar 2013
 

ItemTemplate edit

Summary REVARG and REVTITLE are undocumented macros, and expanded as both a macro and a formatting token
ReportedBy GeorgeClark
Codebase 1.1.4, trunk
SVN Range
AppliesTo Engine
Component Documentation, FoswikiUIRDiff, FoswikiUIView, REVARG, REVTITLE
Priority Normal
CurrentState No Action Required
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release01x01Checkins
Topic revision: r5 - 06 Jul 2015, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy