[Rt-devel] PATCH: Link symmetry

Rolf Grossmann rg at progtech.net
Fri Nov 4 19:04:46 EST 2005


Todd Chapman wrote:

> OK gang,
> 
> Here is my stab at fixing the asymmetrical link
> transaction problem. Added a couple of tests
> and everything passes. See any problems?

You've been a busy beaver, thank you.

I guess you didn't test the other scrips actually not running (the
default would be on, right?), because there is a typo in you patch:
ActtivateScrips (note the extra t) on both _NewTransaction calls.

Also, I usually prefer to have the simpler branch of a condition handled
first, especially when it involves a return clause. You've switched that
for the one
	if ( $args{'Silent'} ) {
I guess you wanted to collect the returning at the end of the function.

Ok, now that I'm done nitpicking (sorry for that ;)), I'd also like to
remark what you're suggesting now is to always have the second
transaction, but to only conditionally run the scrips for it. I don't
think that's the right thing to do. I think the argument was to always
run scrips with a transaction. If you're being backwards compatible, you
can do without the extra transaction aswell. So I'd suggest to
completely scrap the extra (misspelled ;)) option and add the condition
with the
	if ( $remote_uri->IsLocal )
like this:
	if ( $remote_uri->IsLocal && $RT::LinkMakes2Transactions)

What do you think?

Rolf.


More information about the Rt-devel mailing list