From bff9c617ac143e60dc0e0f57bed06928f3b133d0 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Fri, 15 May 2009 21:30:21 -0700 Subject: [PATCH] Fix the content handler. --- lib/WebGUI/Content/FilePump.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/WebGUI/Content/FilePump.pm b/lib/WebGUI/Content/FilePump.pm index 0433e958b..937a07d66 100644 --- a/lib/WebGUI/Content/FilePump.pm +++ b/lib/WebGUI/Content/FilePump.pm @@ -36,12 +36,15 @@ sub handler { my ($session) = @_; my $output = undef; return undef unless $session->form->get('op') eq 'filePump'; - my $function = "www_".$session->form->get('func'); - if ($function ne "www_" && (my $sub = WebGUI::FilePump::Admin->can($function))) { + my $method = $session->form->get( 'method' ) + ? 'www_' . $session->form->get( 'method' ) + : 'www_manage' + ; + if ($method ne "www_" && (my $sub = WebGUI::FilePump::Admin->can($method))) { $output = $sub->($session); } else { - WebGUI::Error::MethodNotFound->throw(error=>"Couldn't call non-existant method $function inside FilePump", method=>$function); + WebGUI::Error::MethodNotFound->throw(error=>"Couldn't call non-existant method $method inside FilePump", method=>$method); } return $output; }