Make sure Event menuTitles are <= 15 characters
This commit is contained in:
parent
8faf7951d0
commit
d1ebb39b11
2 changed files with 12 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue