Closed (fixed)
Project:
Bibliography Module
Version:
6.x-1.14
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
8 Oct 2010 at 06:22 UTC
Updated:
22 Oct 2010 at 16:00 UTC
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 commentedGood point, I've fixed that.
http://drupal.org/cvs?commit=433528
Ron.