[MKDoc-commit] [1.6] show hidden child documents to editors, not just in hidden pages

bruno at mkdoc.demon.co.uk bruno at mkdoc.demon.co.uk
Thu Aug 18 17:07:43 BST 2005


Log Message:
-----------
[1.6] show hidden child documents to editors, not just in hidden pages

Tags:
----
mkdoc-1-6

Modified Files:
--------------
    mkd/flo/Record:
        Document.pm

-------------- next part --------------
Index: Document.pm
===================================================================
RCS file: /var/spool/cvs/mkd/flo/Record/Document.pm,v
retrieving revision 1.25.2.70
retrieving revision 1.25.2.71
diff -Lflo/Record/Document.pm -Lflo/Record/Document.pm -u -r1.25.2.70 -r1.25.2.71
--- flo/Record/Document.pm
+++ flo/Record/Document.pm
@@ -94,13 +94,13 @@
 
 =pod
 
-  $self->is_showable_to_hidden()
+  $self->is_showable_to_editor()
 
 Returns FALSE if this object is a versioned backup, TRUE otherwise.
 
 =cut
 
-sub is_showable_to_hidden
+sub is_showable_to_editor
 {
     my $self = shift;
     return not ( $self->is_modified_version() ||
@@ -1707,13 +1707,13 @@
 {
     my $self = shift;
     my @res;
-    if ($self->is_showable)
+    if (flo::Standard::current_user->is_editor)
     {
-        @res  = map { $_->is_showable() ? $_ : () } $self->children;
+        @res  = map { $_->is_showable_to_editor() ? $_ : () } $self->children;
     }
     else
     {
-        @res  = map { $_->is_showable_to_hidden() ? $_ : () } $self->children;
+        @res  = map { $_->is_showable() ? $_ : () } $self->children;
     }
     return wantarray ? @res : \@res;
 }


More information about the MKDoc-commit mailing list