You are here: Foswiki>Tasks Web>Item735 (06 Jul 2011, PaulHarvey)Edit Attach

Item735: recurse=off SEARCH param may be broken (deferred to 1.0.2)

pencil
Priority: Normal
Current State: Confirmed
Released In: n/a
Target Release:
Applies To: Engine
Component: SEARCH
Branches:
Reported By: SvenDowideit
Waiting For:
Last Change By: PaulHarvey
I'm doing a
%SEARCH{
  "WebHome"
  recurse="off"
  scope="topic"
  web="all"
  nonoise="on"
}%

on a foswiki v.1 system that has nested webs

and its listing all the webs and sub webs

needs confirmation, as i'm working on something else.

really hacky thing that works only if you're looking for base webs - because getListOFWebs seems to unconditionally return all nested webs..
Index: Foswiki/Search.pm
===================================================================
--- Foswiki/Search.pm   (revision 763)
+++ Foswiki/Search.pm   (working copy)
@@ -480,7 +480,13 @@
                 $store->getListOfWebs( 'user,allowed', $session->{webName} ) );
         }
     }
-
+    
+    if (!Foswiki::isTrue($recurse)) {
+        @tmpWebs = map{
+                        $_ unless ($_ =~ /\//)
+                        } @tmpWebs;
+    }
+    
     my @webs;
     foreach my $web (@tmpWebs) {
         push( @webs, $web ) unless $excludeWeb{$web};

-- SvenDowideit - 11 Jan 2009

something makes me think this is somewhat related for the need for ExtendedWebListPlugin

-- SvenDowideit - 12 Jan 2009

If one turns it upside down, you could also argue that web="all" should mean all webs. What wins? web="all" or recurse="off"?

I have not tried the different combinations yet but it could be a simple matter of documenting what overrides what.

Open since Jan 11 I guess this one does not need to block 1.0.1.

-- KennethLavrsen - 07 Feb 2009

I agree. Confirmed, and status changed from Urgent to Normal.

-- CrawfordCurrie - 14 Feb 2009

Testing Sven's original search: * About.WebHome

-- PaulHarvey - 06 Jul 2011

ItemTemplate edit

Summary recurse=off SEARCH param may be broken (deferred to 1.0.2)
ReportedBy SvenDowideit
Codebase 1.0.0, trunk
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Engine
Component SEARCH
Priority Normal
CurrentState Confirmed
WaitingFor
Checkins
ReleasedIn n/a
Topic revision: r6 - 06 Jul 2011, PaulHarvey
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy