use strict;
# use warnings; FIXME - Bug 2505
-use CGI;
+use CGI qw ( -utf8 );
use C4::Auth;
use C4::Koha;
use C4::Context;
-use C4::Dates qw(format_date_in_iso);
use C4::Output;
use C4::NewsChannels;
use C4::Languages qw(getTranslatedLanguages);
use Date::Calc qw/Date_to_Days Today/;
use C4::Branch qw/GetBranches/;
+use Koha::DateUtils;
my $cgi = new CGI;
my $id = $cgi->param('id');
my $title = $cgi->param('title');
my $new = $cgi->param('new');
-my $expirationdate = format_date_in_iso($cgi->param('expirationdate'));
-my $timestamp = format_date_in_iso($cgi->param('timestamp'));
+my $expirationdate = output_pref({ dt => dt_from_string( $cgi->param('expirationdate') ), dateformat => 'iso', dateonly => 1 });
+my $timestamp = output_pref({ dt => dt_from_string( $cgi->param('timestamp') ), dateformat => 'iso', dateonly => 1 });
my $number = $cgi->param('number');
my $lang = $cgi->param('lang');
my $branchcode = $cgi->param('branch');
timestamp => $timestamp,
number => $number,
branchcode => $branchcode,
+ borrowernumber => $borrowernumber,
}
);
print $cgi->redirect("/cgi-bin/koha/tools/koha-news.pl");
}
else {
- print $cgi->redirect("/cgi-bin/koha/tools/koha-news.pl?error_message=ERROR:+Required+news+title+missing!");
+ print $cgi->redirect("/cgi-bin/koha/tools/koha-news.pl?error_message=title_missing");
}
}
elsif ( $op eq 'edit' ) {