GetAuthValCode calls were positioned inside the loop,
authorJoe Atzberger <joe.atzberger@liblime.com>
Wed, 7 Jan 2009 20:57:29 +0000 (14:57 -0600)
committerGalen Charlton <galen.charlton@liblime.com>
Wed, 7 Jan 2009 21:11:17 +0000 (15:11 -0600)
commit458b0ed510a9e2fa615ec3074171ae2b1a8589c1
tree70aa90e0b673fde3986cce1974b7019e2967cbf8
parent2dcca73ae0bdfb18728cc867180df892873bf601
GetAuthValCode calls were positioned inside the loop,

despite the same values being supplied each time.  Then
the conditional assignments would repeat the same calls again!
That means execution was liable to query the DB at least once
and as many as four times per item.  With a large number of items
this is an unnecessary burden.  By moving the calls outside
the loop, we can guarantee that we never have to call the DB for
that info more than twice (once for lost, once for damaged).

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
catalogue/detail.pl