The node_access_*_sql() functions are no longer used. The attached patch updates all relevant queries to use db_rewrite_sql().

CommentFileSizeAuthor
db_rewrite.patch5.13 KBtangent

Comments

Kjartan’s picture

Assigned: Unassigned » Kjartan

Committed

Anonymous’s picture

moshe weitzman’s picture

Title: Use of node_access_*_sql() deprecated » remove usage of DISTINCT in node listing queries

That patch is not quite correct. When you run a query through db_rewrite_sql(), you do not need a DISTINCT(n.nid) in there. In fact, you shouldn't. db_erwrite_sql() adds that if needed (i.e. when a node_access module is active). if you leave a DISTINCT in there, you pay a performance penalty.

killes@www.drop.org’s picture

I've dealt with that.

Anonymous’s picture