[Koha-cvs] koha/tools newHolidays.pl [rel_3_0]

Ryan Higgins rch at liblime.com
Thu Jan 25 03:22:47 CET 2007


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_3_0
Changes by:	Ryan Higgins <rych>	07/01/25 02:22:47

Modified files:
	tools          : newHolidays.pl 

Log message:
	javascript escapes for newlines in description; allow empty title.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/tools/newHolidays.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.1.2.2&r2=1.1.2.3

Patches:
Index: newHolidays.pl
===================================================================
RCS file: /sources/koha/koha/tools/newHolidays.pl,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -b -r1.1.2.2 -r1.1.2.3
--- newHolidays.pl	22 Dec 2006 15:02:57 -0000	1.1.2.2
+++ newHolidays.pl	25 Jan 2007 02:22:47 -0000	1.1.2.3
@@ -21,6 +21,14 @@
 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') {





More information about the Koha-cvs mailing list