From: <wit...@us...> - 2013-06-26 12:05:49
|
Revision: 18610 http://sourceforge.net/p/exist/code/18610 Author: withanage Date: 2013-06-26 12:05:45 +0000 (Wed, 26 Jun 2013) Log Message: ----------- [tamobti] bug-fix: home collection showing problem fixed Modified Paths: -------------- apps/tamboti/modules/search/collections.xql Modified: apps/tamboti/modules/search/collections.xql =================================================================== --- apps/tamboti/modules/search/collections.xql 2013-06-26 10:42:23 UTC (rev 18609) +++ apps/tamboti/modules/search/collections.xql 2013-06-26 12:05:45 UTC (rev 18610) @@ -139,10 +139,7 @@ let $collection-path := fn:concat($config:mods-commons, "/", $child) order by upper-case($child) return - if (security:can-read-collection($collection-path)) - then <node>{col:get-collection($collection-path)/child::node()}</node> - else () return (: root collection, containing home and group collection as children :) @@ -296,6 +293,9 @@ else() }; + + + declare function col:get-child-tree-nodes-recursive-for-group($collections as xs:string*, $expanded-collections as xs:string*) as element(node)* { for $collection in $collections let $base-collection := fn:replace($collection, fn:concat("(", $config:users-collection, "/[^/]*)/.*"), "$1") @@ -346,9 +346,7 @@ let $commons-child-children := col:get-child-tree-nodes-recursive($collection-path, $distinct-collection-paths[fn:starts-with(., $collection-path)], $expanded-collections) order by upper-case($child) return - <node>{col:get-collection($collection-path, $commons-child-children, fn:contains($expanded-collections, $collection-path))/child::node()}</node> - return (: root collection, containing home and group collection as children :) @@ -357,6 +355,11 @@ () }; + + + + + (:~ : Request routing : @@ -365,7 +368,7 @@ : If there is no key we deliver the tree root :) if(request:get-parameter("key",()))then - let $collection-path := uu:escape-collection-path(request:get-parameter("key",())) return + let $collection-path := uu:unescape-collection-path(request:get-parameter("key",())) return if($collection-path eq $config:groups-collection) then (: start of groups collection - the groups collection is virtual and so receives special treatment :) col:get-groups-virtual-root() @@ -382,11 +385,9 @@ uu:escape-collection-path($expanded-key) else() return - col:get-from-root-for-prev-state($config:mods-root, - (:xmldb:encode-uri(request:get-parameter("activeKey",())),:) - uu:escape-collection-path(request:get-parameter("activeKey",())), uu:escape-collection-path(request:get-parameter("focusedKey",())), $expanded-collections) + col:get-from-root-for-prev-state($config:mods-root, uu:escape-collection-path(request:get-parameter("activeKey",())), uu:escape-collection-path(request:get-parameter("focusedKey",())), $expanded-collections) else (: no key, so its the root that we want :) col:get-root-collection($config:mods-root) - \ No newline at end of file + |