On Jun 6, 2009, at 3:05 AM, sdumitriu (SVN) wrote:
Author: sdumitriu
Date: 2009-06-06 03:05:33 +0200 (Sat, 06 Jun 2009)
New Revision: 20911
Modified:
enterprise/trunk/wiki/src/main/resources/XWiki/WebSearchCode.xml
Log:
[cleanup] Minor code improvements.
Modified: enterprise/trunk/wiki/src/main/resources/XWiki/
WebSearchCode.xml
===================================================================
--- enterprise/trunk/wiki/src/main/resources/XWiki/WebSearchCode.xml
2009-06-06 00:53:45 UTC (rev 20910)
+++ enterprise/trunk/wiki/src/main/resources/XWiki/WebSearchCode.xml
2009-06-06 01:05:33 UTC (rev 20911)
@@ -38,21 +38,20 @@
#set($text = $text.replaceAll("'",
"''").replaceAll("%", "\\%"))
#set($nbitems = 50)
## -----------------------------------------------------------
- ## Non-admins should not see results from XWiki, Admin and
- ## Panels spaces. Also exclude the WebPreferences doc.
- ## -----------------------------------------------------------
- #if ($xwiki.hasAdminRights())
- #set ($excludedWebs = '')
- #else
- #set ($excludedWebs = "doc.space<>'XWiki' and
doc.space<>'Admin' and doc.space<>'Panels'
and
doc.name<>'WebPreferences' and")
- #end
- ## -----------------------------------------------------------
## Display only a given space if $request.space is defined
## -----------------------------------------------------------
#if("$!space" == '')
- #set ($webClause = $excludedWebs)
+ ## -----------------------------------------------------------
+ ## Non-admins should not see results from XWiki, Admin and
+ ## Panels spaces. Also exclude the WebPreferences doc.
+ ## -----------------------------------------------------------
+ #if ($xwiki.hasAdminRights())
+ #set ($webClause = '')
+ #else
+ #set ($webClause = "doc.space<>'XWiki' and
doc.space<>'Admin' and doc.space<>'Panels'
and
doc.name<>'WebPreferences' and")
Actually this should use $blacklistedSpaces for excluding spaces.
+ #end
#else
- #set ($webClause = "doc.space='$space' and $excludedWebs")
+ #set ($webClause = "doc.space='$space' and")
#end
#macro(addelement $item $list)
#if($xwiki.hasAccessLevel('view', $context.user, "$
{context.database}:${item}"))
Thanks
-Vincent