operations now dynamically loaded

This commit is contained in:
Len Kranendonk 2004-10-28 10:42:31 +00:00
parent ea9a3d5bfc
commit c01f16a27f
28 changed files with 244 additions and 180 deletions

View file

@ -84,13 +84,7 @@ sub _processOperations {
my $op = $session{form}{op};
my $opNumber = shift || 1;
if ($op) {
if ($op =~ /^[A-Za-z]+$/) {
$cmd = "WebGUI::Operation::www_".$op;
$output = eval($cmd);
WebGUI::ErrorHandler::security("call a non-existent operation: $op. Root cause: ".$@) if($@);
} else {
WebGUI::ErrorHandler::security("execute an invalid operation: ".$op);
}
$output = WebGUI::Operation::execute($op);
}
$opNumber++;
if ($output eq "" && exists $session{form}{"op".$opNumber}) {