create new tag
, view all tags

Feature Proposal: Add isValidWebName and isValidTopicName to TWiki::Func


Plugins need to be able to check for valid web names and topic names when creating content. isValidWebName and isValidTopicName already exist in the TWiki module.

Description and Documentation


---+++ isValidWebName( $name, $templateWeb ) -> $boolean

Check for a valid web name.
   * =$name= - web name
   * =$templateWeb= - flag, optional. If true, then template web names (starting with _)
     are considered valid, otherwise only user web names are valid.
Return: true if web name is valid

If $TWiki::cfg{EnableHierarchicalWebs} is off, it will also return false when a nested 
web name is passed to it.

*Since:* TWiki::Plugins::VERSION 1.4 (2011-??-??)


sub isValidWebName {
    return TWiki::isValidWebName( @_ );


---+++ isValidTopicName( $name ) -> $boolean

Check for a valid topic name.
   * =$name= - topic name
Return: true if topic name is valid

*Since:* TWiki::Plugins::VERSION 1.4 (2011-??-??)


sub isValidTopicName {
    return TWiki::isValidTopicName( @_ );




-- Contributors: PeterThoeny - 2011-01-09


This is now accepted by the 7 days review period.

-- PeterThoeny - 2011-01-20

This is now in trunk, SVN:core/lib/TWiki/Func.pm.

-- PeterThoeny - 2011-01-20

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2011-01-20 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.