diff options
author | ivan <ivan> | 2005-02-24 14:24:07 +0000 |
---|---|---|
committer | ivan <ivan> | 2005-02-24 14:24:07 +0000 |
commit | 4d599c8ce382f51d7bfbb4172cdc73a2c8bd400d (patch) | |
tree | 495cce273f64cd9f7e791014b8cf50bc973a4869 /FS/FS/UI | |
parent | 41a036e2d95b39e28eecc624203024e27b3f539b (diff) |
add progressbar to service definition add - duplicate checking can take a while, closes: Bug#1126
Diffstat (limited to 'FS/FS/UI')
-rw-r--r-- | FS/FS/UI/Web.pm | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/FS/FS/UI/Web.pm b/FS/FS/UI/Web.pm index 18c2dfe8c..46e904b00 100644 --- a/FS/FS/UI/Web.pm +++ b/FS/FS/UI/Web.pm @@ -36,9 +36,27 @@ sub new { sub start_job { my $self = shift; - my %param = @_; + warn "FS::UI::Web::start_job: ". join(', ', @_) if $DEBUG; +# my %param = @_; + my %param = (); + while ( @_ ) { + my( $field, $value ) = splice(@_, 0, 2); + unless ( exists( $param{$field} ) ) { + $param{$field} = $value; + } elsif ( ! ref($param{$field}) ) { + $param{$field} = [ $param{$field}, $value ]; + } else { + push @{$param{$field}}, $value; + } + } warn "FS::UI::Web::start_job\n". - join('', map " $_ => $param{$_}\n", keys %param ) + join('', map { + if ( ref($param{$_}) ) { + " $_ => [ ". join(', ', @{$param{$_}}). " ]\n"; + } else { + " $_ => $param{$_}\n"; + } + } keys %param ) if $DEBUG; #first get the CGI params shipped off to a job ASAP so an id can be returned |