From 5cb54af107ba2bd55f9e525e9be5e52707a4adec Mon Sep 17 00:00:00 2001 From: Michal Vaner Date: Fri, 29 Aug 2008 22:19:50 +0200 Subject: [PATCH] Import: fix empty note It was caused by missing chomp and the note was not empty, it contained only newline --- scripts/importil.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/importil.pl b/scripts/importil.pl index 7e0fe4b..4f21c85 100755 --- a/scripts/importil.pl +++ b/scripts/importil.pl @@ -46,6 +46,7 @@ sub insertId( $ ) { sub getUser( $ ) { my( $email ) = @_; + $email = "" unless defined $email; $email =~ s/.*<([^<>]*)>.*/$1/; my( $mailCheck ) = emailCheck( $email, undef ); if( defined $mailCheck ) { @@ -88,6 +89,7 @@ sub setMain( $ ) { print "Importing\n"; while( defined( $_ = <> ) ) { + chomp; if( my( $lid ) = /^### ([0-9a-f]+) ###$/ ) { %ids = (); @toMark = (); -- 2.39.5