You are here: Foswiki>Tasks Web>Item2168 (19 Jun 2014, GeorgeClark)Edit Attach

Item2168: feels to me like there should be a Foswiki::Func::isTagHandlerRegistered

pencil
Priority: Enhancement
Current State: Proposal Required
Released In: n/a
Target Release: n/a
Applies To: Engine
Component: FoswikiFunc
Branches:
Reported By: SvenDowideit
Waiting For:
Last Change By: GeorgeClark
ie

sub isTagHandlerRegistered {
    my ( $tag ) = @_;
    ASSERT($Foswiki::Plugins::SESSION) if DEBUG;

    return exists($Foswiki::functionTags{$tag});
}

though obviously abstracted - in that Func should really call a method in Foswiki.pm, etc, etc, blah.

or to stop me from going mad, we could just have a flag on registerTagHandler which only registers the tag if its not already defined..

(atm i'm thinking of a backport of things like GROUPINFO, but i do wonder about plugins over-registering each other in what is a random order.

-- SvenDowideit - 27 Sep 2009

Rather than a flag to over-register, I'd rather require a "me, me, pick me" flag if you intend to replace. Thus by default it would be an error to re-register a tag. Only if you specify the "me only" flag would your registration over-write another, and once you have registered a "me only" tag, nobody else can register it even if they also give the "me only" flag.

-- CrawfordCurrie - 07 Oct 2009

Changed to Enhancement

-- KennethLavrsen - 09 Jan 2010

ItemTemplate edit

Summary feels to me like there should be a Foswiki::Func::isTagHandlerRegistered
ReportedBy SvenDowideit
Codebase
SVN Range Foswiki-1.0.7, Sun, 20 Sep 2009, build 5061
AppliesTo Engine
Component FoswikiFunc
Priority Enhancement
CurrentState Proposal Required
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
Release01x01Checkins
Topic revision: r5 - 19 Jun 2014, 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