Revision 3ac8bdc7
Von Tamino Steinert vor 26 Tagen hinzugefügt
SL/DB/Manager/EmailJournal.pm | ||
---|---|---|
33 | 33 |
) |
34 | 34 |
)} => \'TRUE'; |
35 | 35 |
}, |
36 |
has_unprocessed_attachments => sub { |
|
37 |
my ($key, $value, $prefix) = @_; |
|
38 |
|
|
39 |
# if $value is truish, we want at least one link otherwise we want none |
|
40 |
my $comp = !!$value ? '>' : '='; |
|
41 |
|
|
42 |
# table emial_journal is aliased as t1 |
|
43 |
return |
|
44 |
\qq{( |
|
45 |
SELECT CASE WHEN count(*) $comp 0 THEN TRUE ELSE FALSE END |
|
46 |
FROM email_journal_attachments |
|
47 |
WHERE |
|
48 |
email_journal_attachments.email_journal_id = t1.id |
|
49 |
AND email_journal_attachments.processed = FALSE |
|
50 |
)} => \'TRUE'; |
|
51 |
}, |
|
36 | 52 |
); |
37 | 53 |
|
38 | 54 |
sub _sort_spec { |
... | ... | |
51 | 67 |
record_links.to_table = 'email_journal'::varchar(50) |
52 | 68 |
AND record_links.to_id = email_journal.id |
53 | 69 |
) |
54 |
)} |
|
70 |
)}, |
|
71 |
has_unprocessed_attachments => qq{( |
|
72 |
SELECT count(*) |
|
73 |
FROM email_journal_attachments |
|
74 |
WHERE |
|
75 |
email_journal_attachments.email_journal_id = email_journal.id |
|
76 |
AND email_journal_attachments.processed = FALSE |
|
77 |
)}, |
|
55 | 78 |
}, |
56 | 79 |
); |
57 | 80 |
} |
Auch abrufbar als: Unified diff
EmailJournal: Nach unverarbeiteten E-Mails filtern