The container() filter SQL now JOINs on m.source instead of mrd.id,
since mrd is not yet defined in the query (and m.source == mrd.id).
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
$rec_join
WHERE c.btype = > . $self->QueryParser->quote_value($ctype) .
qq< AND c.id = > . $self->QueryParser->quote_value($cid) .
- qq< AND (c.pub IS TRUE $perm_join)) container ON (container.container_item = mrd.id) >;
+ qq< AND (c.pub IS TRUE $perm_join)) container ON (container.container_item = m.source) >;
} else {$container = ''};
} else {
$container = '';