Make sure Event menuTitles are <= 15 characters

This commit is contained in:
Graham Knop 2007-04-23 21:23:05 +00:00
parent 8faf7951d0
commit d1ebb39b11
2 changed files with 12 additions and 1 deletions

View file

@ -18,6 +18,8 @@
http://www.plainblack.com/bugs/tracker/webguiimage-new-doesnt-obey-width-and-height-settings http://www.plainblack.com/bugs/tracker/webguiimage-new-doesnt-obey-width-and-height-settings
- fix: Calendar week view didn't display events correctly if they happened on - fix: Calendar week view didn't display events correctly if they happened on
Sunday or if first day of week was set to Monday. Sunday or if first day of week was set to Monday.
- fix: Events limit menuTitle to 15 characters yet if not specified, used
Title without limiting its length.
7.3.14 7.3.14
- fix: a typo in DatabaseLink.pm - fix: a typo in DatabaseLink.pm

View file

@ -165,7 +165,16 @@ sub canEdit {
} }
sub update {
my $self = shift;
my $properties = shift;
# Make sure menuTitle has some text, and that it is <= 15 characters.
if (exists $properties->{menuTitle}) {
$properties->{menuTitle} ||= $properties->{title} || $self->getTitle;
$properties->{menuTitle} = substr($properties->{menuTitle}, 0, 15);
}
return $self->SUPER::update($properties);
}