• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

All it does is to override the home topic name in the oops redirect after the web is created. It never seems to be used.

CC


well, it could be used in some TWikiApplications (no, really, it could be), so i'm hesistant to remove it. however, the code can be made easier to follow:

Index: Manage.pm
===================================================================
--- Manage.pm   (revision 6719)
+++ Manage.pm   (working copy)
@@ -189,7 +189,7 @@
     }
     $baseWeb = TWiki::Sandbox::untaintUnchecked( $baseWeb );

-    my $newTopic = $query->param( 'newtopic' ) || '';
+    my $newTopic = $query->param( 'newtopic' ) || $TWiki::cfg{HomeTopicName};
     # SMELL: check that it is a valid topic name?
     $newTopic = TWiki::Sandbox::untaintUnchecked( $newTopic );

@@ -222,8 +222,6 @@
     }

     # everything OK, redirect to last message
-    $newTopic = $TWiki::cfg{HomeTopicName} unless( $newTopic );
-
     throw TWiki::OopsException
       ( 'attention',
         web => $newWeb,

SVN:6753

on a related note, i'm not sure what the purpose of $topicName is. it's only used to check permissions to create the web. seems like someting like $TWiki::cfg{HomeTopicName} could be used equally well (and $topicName is probably always defaulting to $TWiki::cfg{HomeTopicName} anyway). i guess it's just there because it's a "standard" parameter.

WN

ItemTemplate
Summary Pointless newtopic parameter on createWeb
ReportedBy CrawfordCurrie
AppliesTo Engine
Priority Normal
CurrentState No Action Required
WaitingFor

Checkins 6753
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2005-10-04 - WillNorris
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback