Changeset 08544e0


Ignore:
Timestamp:
May 22, 2010, 11:00:04 PM (10 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.7, release-1.8, release-1.9
Children:
5d1324f
Parents:
07f655b
git-author:
Nelson Elhage <nelhage@mit.edu> (05/22/10 18:30:21)
git-committer:
Nelson Elhage <nelhage@mit.edu> (05/22/10 23:00:04)
Message:
Default style: Be more robust against undefs
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/lib/BarnOwl/Style/Default.pm

    r0fe69d2 r08544e0  
    3232    my $m = shift;
    3333    return $m->is_personal && $m->direction eq "in";
     34}
     35
     36sub maybe {
     37    my $x = shift;
     38    return defined($x) ? $x : "";
    3439}
    3540
     
    99104            $header .= ' / ' . $self->humanize($m->subcontext, 1);
    100105        }
    101         $header .= ' / @b{' . $m->pretty_sender . '}';
     106        $header .= ' / @b{' . maybe($m->pretty_sender) . '}';
    102107    }
    103108
Note: See TracChangeset for help on using the changeset viewer.