View | Details | Raw Unified | Return to bug 15326
Collapse All | Expand All

(-)a/Koha/CmsPages.pm (-5 / +4 lines)
Lines 59-72 sub add { Link Here
59
    carp( 'Koha::CmsPages::add() undefined parameter: input' ) unless defined $input;
59
    carp( 'Koha::CmsPages::add() undefined parameter: input' ) unless defined $input;
60
60
61
    my $data = {
61
    my $data = {
62
        parent     => $input->{parent},
62
        parent     => $input->{parent} eq '' ? undef : $input->{parent},
63
        location   => $input->{location},
63
        location   => $input->{location} eq '' ? undef : $input->{location},
64
        branchcode => $input->{branchcode},
64
        branchcode => $input->{branchcode} eq '' ? undef : $input->{branchcode},
65
        lang       => $input->{lang},
65
        lang       => $input->{lang},
66
        sortorder  => $input->{sortorder},
66
        sortorder  => $input->{sortorder},
67
        title      => $input->{title},
67
        title      => $input->{title},
68
        title_link => $input->{title_link},
68
        title_link => $input->{title_link},
69
        publish    => $input->{publish},
69
        publish    => $input->{publish} eq 'on' ? 1 : 0,
70
        content    => $input->{content}
70
        content    => $input->{content}
71
    };
71
    };
72
72
73
- 

Return to bug 15326