Reverting Thingy RFE commit.

This commit is contained in:
Colin Kuskie 2009-06-11 16:38:39 +00:00
parent be15838529
commit c95ea52978
2 changed files with 8 additions and 14 deletions

View file

@ -14,7 +14,6 @@
- refixed #10260: WebGUI::Asset::Wobject::Gallery.pm default search date misfunction
- fixed #9953: Matrix 2.0 - Not enough tests
- fixed #10121: Q and A template doesn't work with default Forum Rich Editor
- rfe #10423: Provide a way to access the instance of the thing that was added, modified, or deleted via workflow. (Eric Kennedy)
- fixed #10486: Hardcoded extras in files in www/extras
- fixed: LDAP authentication does not check for failed passwords. Bug added to 7.7.10.

View file

@ -473,14 +473,14 @@ sub deleteThingData {
return undef unless $self->canEditThingData($thingId, $thingDataId);;
$self->deleteCollateral("Thingy_".$thingId,"thingDataId",$thingDataId);
my ($onDeleteWorkflowId) = $db->quickArray("select onDeleteWorkflowId from Thingy_things where thingId=?"
,[$thingId]);
if ($onDeleteWorkflowId){
$self->triggerWorkflow($onDeleteWorkflowId, $thingId,$thingDataId);
$self->triggerWorkflow($onDeleteWorkflowId);
}
$self->deleteCollateral("Thingy_".$thingId,"thingDataId",$thingDataId);
return undef;
}
@ -598,13 +598,13 @@ sub editThingDataSave {
my ($onAddWorkflowId) = $session->db->quickArray("select onAddWorkflowId from Thingy_things where thingId=?"
,[$thingId]);
if ($onAddWorkflowId){
$self->triggerWorkflow($onAddWorkflowId,$thingId,$newThingDataId);
$self->triggerWorkflow($onAddWorkflowId);
}
}else{
my ($onEditWorkflowId) = $session->db->quickArray("select onEditWorkflowId from Thingy_things where thingId=?"
,[$thingId]);
if ($onEditWorkflowId){
$self->triggerWorkflow($onEditWorkflowId,$thingId,$newThingDataId);
$self->triggerWorkflow($onEditWorkflowId);
}
}
@ -1390,7 +1390,7 @@ sub purge {
#-------------------------------------------------------------------
=head2 triggerWorkflow ( workflowId, thingId, thingDataId )
=head2 triggerWorkflow ( workflowId )
Runs the specified workflow when this Thingy changes.
@ -1404,17 +1404,12 @@ sub triggerWorkflow {
my $self = shift;
my $workflowId = shift;
my $thingId = shift ;
my $thingDataId = shift ;
my $workflowInstance = WebGUI::Workflow::Instance->create($self->session, {
WebGUI::Workflow::Instance->create($self->session, {
workflowId=>$workflowId,
className=>"WebGUI::Asset::Wobject::Thingy",
methodName=>"new",
parameters=>$self->getId
});
$workflowInstance->setScratch("thingId", $thingId);
$workflowInstance->setScratch("thingDataId",$thingDataId);
$workflowInstance->start;
})->start;
return undef;
}