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

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


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

Modified files:
	tools          : exceptionHolidays.pl 

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

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

Patches:
Index: exceptionHolidays.pl
===================================================================
RCS file: /sources/koha/koha/tools/exceptionHolidays.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
--- exceptionHolidays.pl	22 Dec 2006 15:02:57 -0000	1.1.2.2
+++ exceptionHolidays.pl	25 Jan 2007 02:22:11 -0000	1.1.2.3
@@ -23,6 +23,14 @@
 
 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,





More information about the Koha-cvs mailing list