[ic] Form action set automatically update_user

Mike Heins mike at perusion.com
Fri Dec 12 17:05:40 EST 2003


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

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

People who want to share their religious views with you
almost never want you to share yours with them. -- Dave Barry


More information about the interchange-users mailing list