From 561744fd3b3dcd8cf0280e3b6dc2a81889610b29 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Wed, 30 Sep 2009 13:24:06 +0200 Subject: [PATCH] Funktion nicht doppelt invertieren (das klingt als commit meldung noch bescheuerter als es im code aussieht) --- SL/CVar.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SL/CVar.pm b/SL/CVar.pm index b97b5a5db..703bbfe3a 100644 --- a/SL/CVar.pm +++ b/SL/CVar.pm @@ -364,7 +364,7 @@ sub render_inputs { foreach my $var (@{ $params{variables} }) { $var->{HTML_CODE} = $form->parse_html_template('amcvar/render_inputs', { 'var' => $var, %options }); - $var->{VALID_BOX} = "{valid} ? ' checked' : '']}>"; + $var->{VALID_BOX} = "{valid} ? ' checked' : '']}>"; } $main::lxdebug->leave_sub(); @@ -603,7 +603,7 @@ Suppose the following scenario: You have a lot of parts in your database, and a set of properties cofigured. Now not every part has every of these properties, some combinations will just make no sense. In order to clean up your inputs a bit, you want to mark certain combinations as invalid, blocking them from modification and possibly display. Validity is assumed. If you modify validity, you actually save B. -validity is saved as a function of config_id, and the trans_id +iNvalidity is saved as a function of config_id, and the trans_id In the naive way, disable an attribute for a specific id (simple) @@ -665,11 +665,11 @@ sub get_custom_variables_validity { my $query = qq|SELECT COUNT(*) FROM custom_variables_validity WHERE config_id = ? AND trans_id = ?|; - my ($validity) = selectfirst_array_query($form, $dbh, $query, conv_i($params{config_id}), conv_i($params{trans_id})); + my ($invalid) = selectfirst_array_query($form, $dbh, $query, conv_i($params{config_id}), conv_i($params{trans_id})); $main::lxdebug->leave_sub(); - return $validity; + return !$invalid; } 1; -- 2.20.1