Merge branch 'master' of /home/jmf/repos/koha-rm-root.git/
[koha_fer] / tools / exceptionHolidays.pl
index ed5e976..dd47161 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;
@@ -23,6 +22,14 @@ my $description = $input->param('showDescription');
 
 my $calendar = C4::Calendar->new(branchcode => $branchcode);
 
+$title || ($title = '');
+if ($description) {
+    $description =~ s/\r/\\r/g;
+    $description =~ s/\n/\\n/g;
+} else {
+    $description = '';
+}   
+
 if ($input->param('showOperation') eq 'exception') {
        $calendar->insert_exception_holiday(day => $day,
                                                                                month => $month,