summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-01-31 20:45:10 +0000
committerDries Buytaert <dries@buytaert.net>2005-01-31 20:45:10 +0000
commit96c039680a0215df683f089abdf6cbb4448e1b2e (patch)
treefc5ea338f56ecb3fbea0a755f5ffb426709620c5 /modules
parente872b005f1cd3f9659c95dd2b42e5177246cedaf (diff)
downloadbrdo-96c039680a0215df683f089abdf6cbb4448e1b2e.tar.gz
brdo-96c039680a0215df683f089abdf6cbb4448e1b2e.tar.bz2
- Patch #16111 by chx: fixed some bugs in the db_rewrite_sql() code.
Diffstat (limited to 'modules')
-rw-r--r--modules/node.module4
-rw-r--r--modules/node/node.module4
2 files changed, 4 insertions, 4 deletions
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']);
diff --git a/modules/node/node.module b/modules/node/node.module
index 63bc7b1df..0fd24ae6d 100644
--- a/modules/node/node.module
+++ b/modules/node/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']);