The db_rewrite_sql hook is not yet documented at Drupaldocs.
I'm trying to figure out the best way to fix taxonomy.module so that
it only shows terms which are associated with nodes which the user has
access to. Károly Négyesi's rewrite patch
(http://drupal.org/node/16452) gets us part of the way but it seems
that a db_rewrite_sql hook needs to be added to his patch. Is this
something you can address, perhaps in a different patch if necessary,
Károly?
Project: Drupal
Version: cvs
Component: taxonomy.module
Category: bug reports
Priority: critical
Assigned to: Anonymous
Reported by: tangent
Updated by: tangent
Status: patch
Attachment: http://drupal.org/files/issues/nodeaccess.patch (1.21 KB)
I am testing the nodeperm_role.module and I experienced an SQL error
when node permissions are changed.
The problem is that the query in question uses "INNER JOIN {term_node}
USING (tid)" but the db_rewrite_sql() function adds another inner join
in front of this one so the USING clause breaks. My patch changes all
the USING statements to ON to prevent this.
Perhaps the documentation for db_rewrite_sql() should be updated to
warn against the use of the USING clause. I don't see any other
instances of it in core but many contrib modules use it.
tangent
--
View: http://drupal.org/node/17794
Edit: http://drupal.org/project/comments/add/17794