Revision 68d15545
Von Jan Büren vor mehr als 1 Jahr hinzugefügt
SL/DB/Manager/Chart.pm | ||
---|---|---|
38 | 38 |
my ($key, $value) = @_; |
39 | 39 |
return __PACKAGE__->booked_filter($value); |
40 | 40 |
}, |
41 |
invalid => sub { |
|
42 |
my ($key, $value) = @_; |
|
43 |
return __PACKAGE__->invalid_filter($value); |
|
44 |
}, |
|
45 |
|
|
41 | 46 |
); |
47 |
sub invalid_filter { |
|
48 |
my ($class, $invalid) = @_; |
|
49 |
|
|
50 |
$invalid //= 0; |
|
51 |
my @filter; |
|
52 |
|
|
53 |
if ( $invalid ) { |
|
54 |
push @filter, ( id => [ \"SELECT id FROM chart" ] ); |
|
55 |
} else { |
|
56 |
push @filter, ( id => [ \"SELECT id FROM chart WHERE NOT invalid" ] ); |
|
57 |
}; |
|
58 |
|
|
59 |
return @filter; |
|
60 |
} |
|
61 |
|
|
42 | 62 |
|
43 | 63 |
sub booked_filter { |
44 | 64 |
my ($class, $booked) = @_; |
Auch abrufbar als: Unified diff
erste Idee: Ungültig für ChartPicker umgesetzt