Oops, I broke searching for members-only entries. Fix.

        Patch by fu. 

diffs (23 lines):

diff -r d1428ccce103 -r bdeb70714459 htdocs/search.bml
--- a/htdocs/search.bml Thu Oct 14 13:25:45 2010 +0800
+++ b/htdocs/search.bml Fri Oct 15 18:56:41 2010 +0800
@@ -112,11 +112,15 @@ body<=
         # if it's you, all posts, all bits
         if ( $remote->equals( $su ) ) {
             $ignore_security = 1;
+        } elsif ( $su->is_community ) {
+            # if it's a community you administer, also all bits
+            if ( $remote->can_manage( $su ) ) {
+                $ignore_security = 1;
 
-        # or a comm you administer...
-        } elsif ( $su->is_community && $remote->can_manage( $su ) ) {
-            $ignore_security = 1;
-
+            # for communities, member_of is the same as allow mask (no custom 
groups)
+            } else {
+                $allowmask = $remote->member_of( $su );
+            }
         # otherwise, if they trust you, get the mask ...
         } elsif ( $su->trusts( $remote ) ) {
             $allowmask = $su->trustmask( $remote );
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to