_getOrCreateRequestConfiguration: Implement.
Implementation of this method.
This commit is contained in:
		
							parent
							
								
									3203a62d5b
								
							
						
					
					
						commit
						92d36a4039
					
				
					 1 changed files with 15 additions and 0 deletions
				
			
		|  | @ -637,6 +637,21 @@ sub _getOrCreateRequestConfiguration($$) { | |||
|   die "_getOrCreateRequestConfiguration: requestTypeId must be a number" unless looks_like_number($requestTypeId); | ||||
|   die "_getOrCreateRequestConfiguration: requestTypeId is unknown" unless $self->_verifyRequestTypeId($requestTypeId); | ||||
| 
 | ||||
|   if (not defined $params->{requestConfigurationId}) { | ||||
|     $params->{requestConfigurationId} = $self->addRequestType($params->{requestConfiguration}); | ||||
|   } else { | ||||
|     my $id = $params->{requestConfigurationId}; | ||||
|     die "_getOrCreateRequestConfiguration(): called with a non-numeric requestConfigurationId, \"$id\"" | ||||
|       unless defined $id and looks_like_number($id); | ||||
| 
 | ||||
|     my $val = $self->dbh()->selectall_hashref("SELECT id FROM request_configuration WHERE id = " . | ||||
|                                               $self->dbh->quote($id, 'SQL_INTEGER'), 'id'); | ||||
| 
 | ||||
|     die "_getOrCreateRequestType(): given requestConfigurationId, \"$id\", is invalid" | ||||
|       unless (defined $val and defined $val->{$id}); | ||||
|   } | ||||
|   delete $params->{requestConfiguration}; | ||||
|   return $params->{requestConfigurationId}; | ||||
| } | ||||
| 
 | ||||
| =item _beginWork() | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Bradley M. Kuhn
						Bradley M. Kuhn