Update of /cvsroot/http-webtest/HTTP-WebTest-Recorder/lib/HTTP/WebTest/Recorder
In directory sc8-pr-cvs1:/tmp/cvs-serv5625/lib/HTTP/WebTest/Recorder
Modified Files:
Actions.pm
Log Message:
Added filter_action()
Index: Actions.pm
===================================================================
RCS file: /cvsroot/http-webtest/HTTP-WebTest-Recorder/lib/HTTP/WebTest/Recorder/Actions.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Actions.pm 4 Apr 2003 21:06:46 -0000 1.5
--- Actions.pm 5 Apr 2003 09:59:22 -0000 1.6
***************
*** 9,13 ****
@EXPORT_OK = qw(default_action enable_action list_action
request_action response_content_action
! delete_action wtscript_action);
%EXPORT_TAGS = (all => [@EXPORT_OK]);
--- 9,13 ----
@EXPORT_OK = qw(default_action enable_action list_action
request_action response_content_action
! delete_action wtscript_action filter_action);
%EXPORT_TAGS = (all => [@EXPORT_OK]);
***************
*** 78,81 ****
--- 78,97 ----
my $num = $controller->cgi->param('num');
splice @{$controller->recorder->tests}, $num, 1;
+
+ $controller->redirect('list');
+ }
+
+ sub filter_action {
+ my $controller = shift;
+
+ my $type = $controller->cgi->param('type');
+ my $field = $controller->cgi->param('field');
+ my $value = $controller->cgi->param('value');
+
+ if(not defined $value or $value eq '') {
+ delete $controller->recorder->filter->{$type}{$field};
+ } else {
+ $controller->recorder->filter->{$type}{$field} = $value;
+ }
$controller->redirect('list');
|