Revision 2bfb8a50
Von Moritz Bunkus vor fast 14 Jahren hinzugefügt
SL/CVar.pm | ||
---|---|---|
338 | 338 |
|
339 | 339 |
do_statement($form, $sth, $query, @values); |
340 | 340 |
|
341 |
my $valid_index = "$params{name_prefix}cvar_$config->{name}$params{name_postfix}_valid"; |
|
342 |
$self->save_custom_variables_validity(trans_id => $params{trans_id}, config_id => $config->{id}, |
|
343 |
validity => ($params{variables}{$valid_index} || $params{always_valid} ? 1 : 0) |
|
344 |
); |
|
341 |
if ($params{save_validity}) { |
|
342 |
my $valid_index = "$params{name_prefix}cvar_$config->{name}$params{name_postfix}_valid"; |
|
343 |
$self->save_custom_variables_validity(trans_id => $params{trans_id}, |
|
344 |
config_id => $config->{id}, |
|
345 |
validity => ($params{variables}{$valid_index} || $params{always_valid} ? 1 : 0) |
|
346 |
); |
|
347 |
} |
|
345 | 348 |
} |
346 | 349 |
|
347 | 350 |
$sth->finish(); |
SL/IC.pm | ||
---|---|---|
583 | 583 |
} |
584 | 584 |
} |
585 | 585 |
|
586 |
CVar->save_custom_variables('dbh' => $dbh, |
|
587 |
'module' => 'IC', |
|
588 |
'trans_id' => $form->{id}, |
|
589 |
'variables' => $form); |
|
586 |
CVar->save_custom_variables(dbh => $dbh, |
|
587 |
module => 'IC', |
|
588 |
trans_id => $form->{id}, |
|
589 |
variables => $form, |
|
590 |
save_validity => 1); |
|
590 | 591 |
|
591 | 592 |
# commit |
592 | 593 |
my $rc = $dbh->commit; |
sql/Pg-upgrade2/invalid_entries_in_custom_variables_validity.sql | ||
---|---|---|
1 |
-- @tag: invalid_entries_in_custom_variables_validity |
|
2 |
-- @description: Ungültige Einträge in custom_variables_validity bereinigen |
|
3 |
-- @depends: release_2_6_1 |
|
4 |
-- @charset: utf-8 |
|
5 |
DELETE FROM custom_variables_validity |
|
6 |
WHERE trans_id NOT IN ( |
|
7 |
SELECT id |
|
8 |
FROM parts |
|
9 |
); |
Auch abrufbar als: Unified diff
Gültigkeit von custom variables nur für Artikelstammdaten speichern
Fix für Bug 1561.