From 96c039680a0215df683f089abdf6cbb4448e1b2e Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 31 Jan 2005 20:45:10 +0000 Subject: - Patch #16111 by chx: fixed some bugs in the db_rewrite_sql() code. --- modules/node.module | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/node.module') diff --git a/modules/node.module b/modules/node.module index 63bc7b1df..0fd24ae6d 100644 --- a/modules/node.module +++ b/modules/node.module @@ -1814,8 +1814,8 @@ function node_access_grants($op, $uid = NULL) { /** * Implementation of hook_db_rewrite_sql */ -function node_db_rewrite_sql($query, $primary_table) { - if ($primary_table=='n') { +function node_db_rewrite_sql($query, $primary_table, $primary_field) { + if ($primary_field == 'nid') { $return['join'] = node_access_join_sql(); $return['where'] = node_access_where_sql(); $return['distinct'] = !empty($return['join']); -- cgit v1.2.3