aboutsummaryrefslogtreecommitdiff
path: root/perl/Wallet
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2007-09-18 20:36:59 +0000
committerRuss Allbery <rra@stanford.edu>2007-09-18 20:36:59 +0000
commit4ecc4f780ca32a7641329121d13e8bf353154358 (patch)
tree6add14e7f2a8fb8301b0c0553ae93ab64906f308 /perl/Wallet
parentf5adcfc9660c2c05715c913e712cf6515a791807 (diff)
Flags are now displayed as part of show.
Diffstat (limited to 'perl/Wallet')
-rw-r--r--perl/Wallet/Object/Base.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/perl/Wallet/Object/Base.pm b/perl/Wallet/Object/Base.pm
index 1075c13..8d01ae8 100644
--- a/perl/Wallet/Object/Base.pm
+++ b/perl/Wallet/Object/Base.pm
@@ -467,7 +467,19 @@ sub show {
}
my $output = '';
my @acls;
+
+ # Format the results. We use a hack to insert the flags before the first
+ # trace field since they're not a field in the object in their own right.
for (my $i = 0; $i < @data; $i++) {
+ if ($attrs[$i][0] eq 'ob_created_by') {
+ my @flags = $self->flag_list;
+ if (@flags == 1 and not defined $flags[0]) {
+ return undef;
+ }
+ if (@flags) {
+ $output .= sprintf ("%15s: %s\n", 'Flags', "@flags");
+ }
+ }
next unless defined $data[$i];
if ($attrs[$i][0] =~ /^ob_(owner|acl_)/) {
my $acl = eval { Wallet::ACL->new ($data[$i], $self->{dbh}) };