Feature Proposal: Add isValidWebName and isValidTopicName to TWiki::Func
Motivation
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
=pod
---+++ 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-??-??)
=cut
sub isValidWebName {
return TWiki::isValidWebName( @_ );
}
=pod
---+++ 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-??-??)
=cut
sub isValidTopicName {
return TWiki::isValidTopicName( @_ );
}
Examples
Impact
Implementation
--
Contributors: PeterThoeny - 2011-01-09
Discussion
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