[ic] Form action set automatically update_user

Mike Heins mike at perusion.com
Fri Dec 12 17:58:59 EST 2003


Quoting Mike Heins (mike at perusion.com):
> Quoting Bill Carr (bill at worldwideimpact.com):
> > IC 4.9.9
> > 
> > I would like to have a way to override the update_user() call built into
> > form action 'set'. If I am using the table-editor to edit a table that
> > has some of the same column names as my userdb table I do not want my
> > values updated.  I could not find a way to do this with out the
> > following hack.
> > 
> > --- /home/bill/download/interchange-4.9.9/lib/Vend/Dispatch.pm 
> > 2003-10-28 12:22:29.000000000 -0500
> > +++ /ic/lib/Vend/Dispatch.pm    2003-12-12 16:15:39.000000000 -0500
> > @@ -534,9 +534,9 @@
> >                                         return 1;
> >                                 },
> >         set             => sub {
> > -                                       update_user() unless
> > $CGI::values{mv_data_auto_number};
> > +                                       update_user() unless
> > $CGI::values{mv_data_auto_number} || $CGI::values{mv_no_update_user};
> >                                         update_data();
> > -                                       update_user() if
> > $CGI::values{mv_data_auto_number};
> > +                                       update_user() if
> > $CGI::values{mv_data_auto_number} && !$CGI::values{mv_no_update_user};
> >                                         return 1;
> >                                 },
> >         autoset => sub {
> 
> Won't the usual method work?
> 
> FormAction set <<EOR
> sub {
> 	$Tag->update('values')
> 		unless $CGI->{mv_data_auto_number} || $CGI->{mv_no_update_user};
> 	$Tag->update('data');
> 	$Tag->update('values') if $CGI->{mv_data_auto_number};
> 	#Debug("In user form action");
> 	return 1;
> }
> EOR

Another thing which should work is adding

	hidden.mv_values_space=temporary

to the table-editor tag. That will make it send the values to a
different area of the session.

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

How far can you open your mind before your brains fall out?


More information about the interchange-users mailing list