Implement kwarg active emails query.
This commit is contained in:
parent
8fcff8e5dc
commit
b1e0c04a8a
2 changed files with 12 additions and 5 deletions
|
@ -124,7 +124,7 @@ MBASE-SOURCES=mbase.scm testing.import.scm util-dict-list.import.scm \
|
||||||
cal-period.import.scm cal-month.import.scm \
|
cal-period.import.scm cal-month.import.scm \
|
||||||
configuration.import.scm progress.import.scm \
|
configuration.import.scm progress.import.scm \
|
||||||
table.import.scm mbase-dir.import.scm util-list.import.scm \
|
table.import.scm mbase-dir.import.scm util-list.import.scm \
|
||||||
util-tag.import.scm
|
util-tag.import.scm util-kwargs.import.scm
|
||||||
|
|
||||||
mbase.o: mbase.import.scm
|
mbase.o: mbase.import.scm
|
||||||
mbase.import.scm: $(MBASE-SOURCES)
|
mbase.import.scm: $(MBASE-SOURCES)
|
||||||
|
|
|
@ -78,7 +78,8 @@
|
||||||
configuration
|
configuration
|
||||||
progress
|
progress
|
||||||
mbase-dir
|
mbase-dir
|
||||||
util-tag)
|
util-tag
|
||||||
|
util-kwargs)
|
||||||
|
|
||||||
;; Constant unique tag
|
;; Constant unique tag
|
||||||
(define TAG-MBASE (make-tag mbase))
|
(define TAG-MBASE (make-tag mbase))
|
||||||
|
@ -258,14 +259,20 @@
|
||||||
|
|
||||||
;; Returns the list of emails of all active members sorted
|
;; Returns the list of emails of all active members sorted
|
||||||
;; alphabetically
|
;; alphabetically
|
||||||
(define (mbase-active-emails mb)
|
(define-kwproc (mbase-active-emails mb
|
||||||
|
(#:active active #t)
|
||||||
|
(#:suspended suspended #f))
|
||||||
(sort
|
(sort
|
||||||
(filter
|
(filter
|
||||||
string?
|
string?
|
||||||
(map
|
(map
|
||||||
(lambda (mr)
|
(lambda (mr)
|
||||||
(brmember-info mr 'mail))
|
(brmember-info mr 'mail))
|
||||||
(filter brmember-active?
|
(filter (lambda (mr)
|
||||||
|
(or (and active
|
||||||
|
(brmember-active? mr))
|
||||||
|
(and suspended
|
||||||
|
(brmember-suspended? mr))))
|
||||||
(mbase-members mb))))
|
(mbase-members mb))))
|
||||||
string-ci<?))
|
string-ci<?))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue