Add stories to a story archive.

i18n support for that.
log problems when calling www_add in the story archive.
This commit is contained in:
Colin Kuskie 2009-03-05 17:22:41 +00:00
parent 04105713f0
commit 40d17b7be9
4 changed files with 51 additions and 11 deletions

View file

@ -333,11 +333,18 @@ www_add, find the right folder to use, then allow that folder to continue on.
sub www_add {
my $self = shift;
my $form = $self->session->form;
return undef unless $form->get('class') eq 'WebGUI::Asset::Story';
my $self = shift;
my $session = $self->session;
my $form = $session->form;
if ($form->get('class') ne 'WebGUI::Asset::Story') {
$session->log->warn('Refusing to add '. $form->get('class'). ' to StoryArchive');
return undef;
}
my $todayFolder = $self->getFolder;
return undef unless $todayFolder;
if (!$todayFolder) {
$session->log->warn('Unable to get folder for today. Not adding Story');
return undef;
}
$todayFolder->www_add;
}