[drupal-devel] Logic in node.module's node_db_rewrite_sql function

Karoly Negyesi karoly at negyesi.net
Thu Jun 16 13:56:52 UTC 2005


> Looking at node.module it only sets distinct if
> !node_access_view_all_nodes() which seems to be an access permissions
> related condition.

http://drupaldocs.org/api/head/function/hook_db_rewrite_sql

Any module can implement this hook and if the returned associate array 
contains 'distinct' => 1 then DISTINCT will fire.

node module implementation of this: if the 'grant all' is not in place, then 
there should be a node grant module in use, so let's fire a DISTINCT.



More information about the drupal-devel mailing list