Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi
At the moment "Recent publications" block shows entries of all users even if option "Restrict users such that they can only view their own biblio entries" is on and the user has no access to them.
I suggest following changes:
function biblio_block($op = 'list', $delta = 0) {
global $user;
...
$limit = '';
if (variable_get('biblio_view_only_own', 0) ) {
$limit .= " AND n.uid = $user->uid ";
}
$query = "SELECT n.nid, n.title
FROM {node} n
LEFT JOIN {biblio} b on n.vid=b.vid
WHERE n.type = 'biblio' AND n.status=1" . $limit . "ORDER BY $block_order DESC";
There is probably better way of adding the $limit to $query.
There is similar problem with filter where for example author names are shown for which there will be no results.
Adam
Comments
Comment #1
rjerome CreditAttribution: rjerome commentedGood point, I've fixed that.
http://drupal.org/cvs?commit=433528
Ron.