Bug: Sidebar is constructed erroneously when non-web directories are present
When the data directory contains subdirectories that do not represent webs (e.g., a CVS directory), the side bar will show the name of the directory, a newline, and then a question mark. Clicking on the question mark will try to create a
WebHome topic in that directory.
While the behavior of offering to create a
WebHome topic might seem reasonable, probably it is not. If a directory does not contain a
WebHome topic, likely it is not intended to be a Web. If somebody were to create a new web, they would usually copy over the files from the default web, rather than just creating an empty directory.
I would suggest that links are not created for subdirectories in data which do not contain a
WebHome topic.
Test case
Environment
--
ThomasWeigert - 27 Dec 2004
Follow up
sounds reasonable to me. just make sure to check for
%HOMETOPIC% rather than a hard-coded
WebHome
--
WillNorris - 03 May 2005
Fix record
SVN 4341:
Index: Store.pm
===================================================================
--- Store.pm (revision 4340)
+++ Store.pm (working copy)
@@ -1193,8 +1193,7 @@
$filter ||= '';
opendir DIR, "$TWiki::cfg{DataDir}" ;
- my @webList = grep { !/^\./ &&
- -d "$TWiki::cfg{DataDir}/$_" } readdir( DIR );
+ my @webList = grep { -e "$TWiki::cfg{DataDir}/$_/WebHome.txt" } readdir( DIR );
closedir( DIR );
if ( $filter =~ /\buser\b/ ) {
CrawfordCurrie did a more extensive (and more proper) fix in
SVN 4351