refix the Workflow bug the correct way

This commit is contained in:
Colin Kuskie 2008-11-17 03:05:41 +00:00
parent 4e91f3d500
commit b2f641e723
2 changed files with 2 additions and 3 deletions

View file

@ -216,8 +216,7 @@ sub www_editWorkflow {
my $addmenu = '<div style="float: left; width: 200px; font-size: 11px;">';
foreach my $class (@{$workflowActivities->{$workflow->get("type")}}) {
my $activity = WebGUI::Workflow::Activity->newByPropertyHashRef($session, {className=>$class});
next unless defined $activity;
if ($activity->can('getName')) {
if (defined $activity) {
$addmenu .= '<a href="'.$session->url->page("op=editWorkflowActivity;className=".$class.";workflowId=".$workflow->getId).'">'.$activity->getName."</a><br />\n";
}
else {

View file

@ -339,7 +339,7 @@ sub newByPropertyHashRef {
return undef unless defined $properties;
return undef unless exists $properties->{className};
my $className = $properties->{className};
eval { WebGUI::Pluggable::load($class) };
eval { WebGUI::Pluggable::load($className) };
if ($@) {
$session->errorHandler->error($@);
return undef;