summaryrefslogtreecommitdiff
path: root/modules/node.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-09-20 20:06:29 +0000
committerDries Buytaert <dries@buytaert.net>2004-09-20 20:06:29 +0000
commit293c283c3bcb5482167bf84168d98b1a9352ceb8 (patch)
tree54e9f22a901b9980e9fc4335ffa67798a74eb5a3 /modules/node.module
parent002f6c936136149b44127937d9bf87fb7f770414 (diff)
downloadbrdo-293c283c3bcb5482167bf84168d98b1a9352ceb8.tar.gz
brdo-293c283c3bcb5482167bf84168d98b1a9352ceb8.tar.bz2
- Patch #10884 by killes: node_access_where_sql() lost a parameter.
Diffstat (limited to 'modules/node.module')
-rw-r--r--modules/node.module8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/node.module b/modules/node.module
index f647bf815..dd226fd21 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -1595,10 +1595,12 @@ function node_nodeapi(&$node, $op, $arg = 0) {
* - "delete"
* @param $node
* The node object (or node array) on which the operation is to be performed.
+ * @param $uid
+ * The user ID on which the operation is to be performed.
* @return
* TRUE if the operation may be performed.
*/
-function node_access($op, $node = NULL) {
+function node_access($op, $node = NULL, $uid = NULL) {
// Convert the node to an object if necessary:
$node = array2object($node);
@@ -1672,7 +1674,7 @@ function node_access_join_sql($node_alias = 'n', $node_access_alias = 'na') {
* @return
* An SQL where clause.
*/
-function node_access_where_sql($op = 'view', $node_access_alias = 'na') {
+function node_access_where_sql($op = 'view', $node_access_alias = 'na', $uid = NULL) {
if (user_access('administer nodes')) {
// This number is being used in a SQL query as a boolean.
// It is "'1'" instead of "1" for database compatibility, as both
@@ -1682,7 +1684,7 @@ function node_access_where_sql($op = 'view', $node_access_alias = 'na') {
$sql = $node_access_alias .'.grant_'. $op .' = 1 AND CONCAT('. $node_access_alias .'.realm, '. $node_access_alias .'.gid) IN (';
$grants = array();
- foreach (node_access_grants($op) as $realm => $gids) {
+ foreach (node_access_grants($op, $uid) as $realm => $gids) {
foreach ($gids as $gid) {
$grants[] = "'". $realm . $gid ."'";
}