use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Database;
-use HTML::Template;
+
+
use C4::Calendar;
my $input = new CGI;
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') {