Item321: createWeb doesnt allow subwebs as system web templates
Priority: Normal
Current State: No Action Required
Released In: 1.1.0
Target Release: minor
Applies To: Engine
Component:
Branches:
Foswiki distinguishes between system webs (starting with "_") and normal webs when creating new webs based on a template / baseweb. For system webs all topics (and not just Web* topics) are copied over to the new web.
The current implementation expects system webs to be webs on the highest level (not subwebs).
If nobody objects, I will change the regex in
Foswiki::Store::createWeb
from
unless ( $baseWeb =~ /^_/ ) {
# not a system web, so filter for only Web* topics
@topicList = grep { /^Web/ } @topicList;
}
to
unless ( $baseWeb =~ /^.*[\/.]_([^\/.]+)/ ) {
# not a system web, so filter for only Web* topics
@topicList = grep { /^Web/ } @topicList;
}
to support subwebs at this point.
--
OliverKrueger - 27 Nov 2008
there's an assumption that you'll be making unit tests to examine and expose any risks?
--
SvenDowideit
Do I need a
FeatureRequest for this?
--
OliverKrueger - 28 Mar 2010
i would say not; seems like a "straightforward" bug to me. sven is just asking that you make the appropriate tests...
--
WillNorris - 29 Mar 2010
Agree.
--
CrawfordCurrie - 28 Aug 2010
Too late for the 1.0 release. In 1.1 this is already done with a
/(?:^_|\/_)/
in
Foswiki::WebFilter
.
Closing.
--
OliverKrueger - 12 Sep 2010