summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-01-23 15:45:38 +0000
committerDries Buytaert <dries@buytaert.net>2005-01-23 15:45:38 +0000
commit898e02252d680bb2f766ab91899bbdb3a7b794dd (patch)
tree0edab995be460f6db64fcc3363b50489d68b8dc0 /modules
parentd9382d8c1508e94cf6b7748ed981d95ca5729be7 (diff)
downloadbrdo-898e02252d680bb2f766ab91899bbdb3a7b794dd.tar.gz
brdo-898e02252d680bb2f766ab91899bbdb3a7b794dd.tar.bz2
- Patch #16026 by chx: fixed node-level permissions.
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 29000edce..fed38070a 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -1725,7 +1725,7 @@ function node_access($op, $node = NULL, $uid = NULL) {
* An SQL join clause.
*/
function node_access_join_sql($node_alias = 'n', $node_access_alias = 'na') {
- if (module_implements('access_grants') == array('node') || user_access('administer nodes')) {
+ if (empty(module_implements('node_grants')) || user_access('administer nodes')) {
return '';
}
@@ -1746,7 +1746,7 @@ function node_access_join_sql($node_alias = 'n', $node_access_alias = 'na') {
* An SQL where clause.
*/
function node_access_where_sql($op = 'view', $node_access_alias = 'na', $uid = NULL) {
- if (module_implements('access_grants') == array('node') || user_access('administer nodes')) {
+ if (empty(module_implements('node_grants')) || 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
// PostgreSQL and MySQL treat it as boolean in this case.
diff --git a/modules/node/node.module b/modules/node/node.module
index 29000edce..fed38070a 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -1725,7 +1725,7 @@ function node_access($op, $node = NULL, $uid = NULL) {
* An SQL join clause.
*/
function node_access_join_sql($node_alias = 'n', $node_access_alias = 'na') {
- if (module_implements('access_grants') == array('node') || user_access('administer nodes')) {
+ if (empty(module_implements('node_grants')) || user_access('administer nodes')) {
return '';
}
@@ -1746,7 +1746,7 @@ function node_access_join_sql($node_alias = 'n', $node_access_alias = 'na') {
* An SQL where clause.
*/
function node_access_where_sql($op = 'view', $node_access_alias = 'na', $uid = NULL) {
- if (module_implements('access_grants') == array('node') || user_access('administer nodes')) {
+ if (empty(module_implements('node_grants')) || 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
// PostgreSQL and MySQL treat it as boolean in this case.