line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package OpenPlugin::Param::CGI; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# $Id: CGI.pm,v 1.18 2003/04/03 01:51:25 andreychek Exp $ |
4
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
1831
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
76
|
|
6
|
2
|
|
|
2
|
|
12
|
use OpenPlugin::Param(); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
40
|
|
7
|
2
|
|
|
2
|
|
10
|
use base qw( OpenPlugin::Param ); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
177
|
|
8
|
2
|
|
|
2
|
|
24
|
use CGI qw( -no_debug ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
15
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
$OpenPlugin::Param::CGI::VERSION = sprintf("%d.%02d", q$Revision: 1.18 $ =~ /(\d+)\.(\d+)/); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub init { |
13
|
2
|
|
|
2
|
0
|
5
|
my ( $self, $args ) = @_; |
14
|
|
|
|
|
|
|
|
15
|
2
|
50
|
|
|
|
9
|
return $self unless $self->OP->request->object; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# Tell OpenPlugin about each parameter we were sent |
18
|
2
|
|
|
|
|
9
|
foreach my $field ( $self->OP->request->object->param() ) { |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# Don't show uploads in this plugin |
21
|
0
|
0
|
|
|
|
0
|
next if ( $self->OP->request->object->upload( $field )); |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
|
|
0
|
my @values = $self->OP->request->object->param( $field ); |
24
|
0
|
0
|
|
|
|
0
|
if ( scalar @values > 1 ) { |
25
|
0
|
|
|
|
|
0
|
$self->set_incoming( $field, \@values ); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
else { |
28
|
0
|
|
|
|
|
0
|
$self->set_incoming( $field, $values[0] ); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
2
|
|
|
|
|
61
|
return $self; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__END__ |