MARC import: part 4 of large file support
[koha_fer] / tools / newHolidays.pl
index 9a8345c..71dd839 100755 (executable)
@@ -5,9 +5,8 @@ use CGI;
 
 use C4::Auth;
 use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Database;
-use HTML::Template;
+
+
 use C4::Calendar;
 
 my $input = new CGI;
@@ -21,6 +20,14 @@ my $year = $input->param('newYear');
 my $title = $input->param('newTitle');
 my $description = $input->param('newDescription');
 
+$title || ($title = '');
+if ($description) {
+       $description =~ s/\r/\\r/g;
+       $description =~ s/\n/\\n/g;
+} else {
+       $description = '';
+}
+
 my $calendar = C4::Calendar->new(branchcode => $branchcode);
 
 if ($input->param('newOperation') eq 'weekday') {