[ic] table-editor tag and item_id with autonumber table

Mike Heins mike at perusion.com
Fri Nov 11 16:47:50 EST 2005


Quoting JT Justman (jt at airdelights.com):
> Okay, I guess I mis-understood what was happening in Editor.pm.
> 
> The code for ignore_cgi_item_id I cited before does not do what I
> thought. It's related to save_cgi.
> 
> Setting cgi=0 (or not setting it at all) prevents item_id from being
> used as the new key. That works fine. I'm not sure why I'd left cgi=1
> all this time anyway - I'm not using any cgi args.
> 
> But, there is a line (2258 in the nightly build 200511110658) that says:
> 
> 	my $key = $opt->{item_id} || $CGI->{item_id};
> 
> This uses the CGI value to populate the form regardless of $opt->{cgi}.
> So I changed it to:
> 
> 	my $key = $opt->{cgi} ? $opt->{item_id} || $CGI->{item_id} :
> $opt->{item_id};
> 
> This ensures that the key stays blank as the form is populated, even if
> there is a value present.
> 
> Is this suitable for addition to CVS? I'm a CVS virgin...
> 

I don't think we can put it in CVS at this point, as the cgi option
is not exactly what you think it is. (It is designed to allow input
of other things like widget types, etc.)

But we could put in a new option -- ignore-cgi-key or something.

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.765.647.1295  tollfree 800-949-1889 <mike at perusion.com>

Nature, to be commanded, must be obeyed. -- Francis Bacon


More information about the interchange-users mailing list