-sub update2_available {
- $main::lxdebug->enter_sub();
-
- my ($form, $controls) = @_;
-
- map({ $_->{"applied"} = 0; } values(%{$controls}));
-
- dbconnect_vars($form, $form->{"dbname"});
-
- my $dbh =
- DBI->connect($form->{dbconnect}, $form->{dbuser}, $form->{dbpasswd}) ||
- $form->dberror;
-
- my ($query, $tag, $sth);
-
- $query = qq|SELECT tag FROM schema_info|;
- $sth = $dbh->prepare($query);
- if ($sth->execute()) {
- while (($tag) = $sth->fetchrow_array()) {
- $controls->{$tag}->{"applied"} = 1 if (defined($controls->{$tag}));
- }
- }
- $sth->finish();
- $dbh->disconnect();
-
- map({ $main::lxdebug->leave_sub() and return 1 if (!$_->{"applied"}) }
- values(%{$controls}));
-
- $main::lxdebug->leave_sub();
- return 0;
-}
-