Revision 9b0c7269
Von Moritz Bunkus vor fast 14 Jahren hinzugefügt
SL/DBUpgrade2.pm | ||
---|---|---|
326 | 326 |
return $needs_update; |
327 | 327 |
} |
328 | 328 |
|
329 |
sub unapplied_upgrade_scripts { |
|
330 |
my ($self, $dbh) = @_; |
|
331 |
|
|
332 |
my @all_scripts = map { $_->{applied} = 0; $_ } $self->sort_dbupdate_controls; |
|
333 |
|
|
334 |
my $query = qq|SELECT tag FROM schema_info|; |
|
335 |
my $sth = $dbh->prepare($query); |
|
336 |
$sth->execute || $self->{form}->dberror($query); |
|
337 |
while (my ($tag) = $sth->fetchrow_array()) { |
|
338 |
$self->{all_controls}->{$tag}->{applied} = 1 if defined $self->{all_controls}->{$tag}; |
|
339 |
} |
|
340 |
$sth->finish; |
|
341 |
|
|
342 |
return grep { !$_->{applied} } @all_scripts; |
|
343 |
} |
|
344 |
|
|
329 | 345 |
sub _check_for_loops { |
330 | 346 |
my ($form, $file_name, $controls, $tag, @path) = @_; |
331 | 347 |
|
Auch abrufbar als: Unified diff
DRY