[COMMIT LOGREPORT] service/all/lib/Lire/UI StringWidget.pm, 1.8, 1.9
Joost van Baal
vanbaal at users.sourceforge.net
Tue Mar 25 20:23:15 CET 2008
Update of /cvsroot/logreport/service/all/lib/Lire/UI
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv5796/all/lib/Lire/UI
Modified Files:
StringWidget.pm
Log Message:
Contribution by Konstantinos Koukopoulos, as per
To: LogReport Development List
Subject: Re: patch for Report Job name in lire(1)
Date: Tue, 20 Sep 2005 15:19:49 +0300
Message-Id: <200509201519.50107.Software.Lire at noc.edunet.gr>
stating
It has been noted that lire(1) allows you to incorrectly use spaces and other
characters to name a Report Job. Also, although the sidebar in lire(1) notes
that you must only use alphanumerics, hyphens and underscores, this is not
mentioned in the user manual. I've attached a patch against cvs which:
a) adds a <warning> to doc/user_manual.dbx
b) adds two lines to all/lib/Lire/UI/StringWidget.pm so that the TextEntry
dialog uses the 'valid-re' attribute of <lrcsml:string>
c) added a regexp to all/lib/config-spec/lire.xml.in to be used for the Report
Job name field.
Index: StringWidget.pm
===================================================================
RCS file: /cvsroot/logreport/service/all/lib/Lire/UI/StringWidget.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- StringWidget.pm 9 Jul 2004 21:14:14 -0000 1.8
+++ StringWidget.pm 27 Feb 2008 14:26:57 -0000 1.9
@@ -20,12 +20,14 @@
check_object_param( $userargs{'value'}, 'value',
'Lire::Config::Scalar' );
+ my $regexp = $userargs{'value'}->spec()->valid_re();
return
$class->Curses::UI::TextEntry::new( %userargs,
'-height' => 1,
'-sbborder' => 1,
'-text' => $userargs{'value'}->get(),
'-onchange' => \&_on_change_cb,
+ '-regexp' => $regexp,
);
}
More information about the Commit
mailing list