Commit a5489b7b authored by Dries's avatar Dries

- Patch by chx: added a db_rewrite_sql() in node_load() just to make sure.
parent ecd7cfed
...@@ -388,7 +388,7 @@ function node_load($conditions, $revision = NULL, $reset = NULL) { ...@@ -388,7 +388,7 @@ function node_load($conditions, $revision = NULL, $reset = NULL) {
} }
// Retrieve the node. // Retrieve the node.
$node = db_fetch_object(db_query('SELECT n.*, u.uid, u.name, u.picture, u.data FROM {node} n INNER JOIN {users} u ON u.uid = n.uid WHERE '. implode(' AND ', $cond))); $node = db_fetch_object(db_query(db_rewrite_sql('SELECT n.*, u.uid, u.name, u.picture, u.data FROM {node} n INNER JOIN {users} u ON u.uid = n.uid WHERE '. implode(' AND ', $cond))));
$node = drupal_unpack($node); $node = drupal_unpack($node);
// Unserialize the revisions and user data fields. // Unserialize the revisions and user data fields.
......
...@@ -388,7 +388,7 @@ function node_load($conditions, $revision = NULL, $reset = NULL) { ...@@ -388,7 +388,7 @@ function node_load($conditions, $revision = NULL, $reset = NULL) {
} }
// Retrieve the node. // Retrieve the node.
$node = db_fetch_object(db_query('SELECT n.*, u.uid, u.name, u.picture, u.data FROM {node} n INNER JOIN {users} u ON u.uid = n.uid WHERE '. implode(' AND ', $cond))); $node = db_fetch_object(db_query(db_rewrite_sql('SELECT n.*, u.uid, u.name, u.picture, u.data FROM {node} n INNER JOIN {users} u ON u.uid = n.uid WHERE '. implode(' AND ', $cond))));
$node = drupal_unpack($node); $node = drupal_unpack($node);
// Unserialize the revisions and user data fields. // Unserialize the revisions and user data fields.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment