[ic] [interchange] Fix for restrict_allow which was being clobbered by default values.

Jon Jensen jon at endpoint.com
Fri May 6 17:08:19 UTC 2016


On Fri, 6 May 2016, Mike Heins wrote:

> Quoting Sam Batschelet (interchange-cvs at icdevgroup.org):
>> commit 8ba9a07d0f0098b5cae6cb4400bf8ead5f4aa91b
>> Author: Sam Batschelet <samb at endpoint.com>
>> Date:   Thu May 5 11:09:09 2016 -0400
>>
>>     Fix for restrict_allow which was being clobbered by default values.
>>
>>  lib/Vend/Table/Editor.pm |    6 +++++-
>>  1 files changed, 5 insertions(+), 1 deletions(-)
>> ---
>> diff --git a/lib/Vend/Table/Editor.pm b/lib/Vend/Table/Editor.pm
>> index 141eed3..de9eb7a 100644
>> --- a/lib/Vend/Table/Editor.pm
>> +++ b/lib/Vend/Table/Editor.pm
>> @@ -916,7 +916,11 @@ sub display {
>>  			last METAMAKE;
>>  		}
>>
>> -		$opt->{restrict_allow} ||= $record->{restrict_allow};
>> +		if ($record->{restrict_allow}) {
>> +			my %restrict_allow;
>> +			@restrict_allow{grep /\S/, split / /, $opt->{restrict_allow} . ' ' . $record->{restrict_allow}} = ();
>> +			$opt->{restrict_allow} = join ' ', sort keys %restrict_allow;
>> +		}
>>  #::logDebug("formatting prepend/append/lookup_query name=$opt->{name} restrict_allow=$opt->{restrict_allow}");
>>  		for(qw/append prepend lookup_query/) {
>>  			next unless $record->{$_};
>>
>
> Doesn't this prevent you from passing a restrict_allow option?

It merges the two sets of restrict_allow values together.

Jon

-- 
Jon Jensen
End Point Corporation
https://www.endpoint.com/



More information about the interchange-users mailing list