? files ? fix_sites.patch ? install_form.patch ? install_form_18.patch ? install_form_20.patch ? install_form_27.patch ? install_form_7_0.patch ? install_rebuild.patch ? no_settings_php.patch ? no_settings_php_0.patch ? nodeapi_access.patch ? tplify_theme.inc.patch ? profiles/InstallerAutolocale.zip ? profiles/dummy ? profiles/modules ? profiles/profiles ? profiles/sites ? profiles/test ? profiles/default/en.po ? profiles/default/it.po ? sites/logrus.com.x ? sites/all/modules ? sites/default/settings.php Index: modules/node/node.module =================================================================== RCS file: /cvs/drupal/drupal/modules/node/node.module,v retrieving revision 1.810 diff -u -p -r1.810 node.module --- modules/node/node.module 10 May 2007 19:57:13 -0000 1.810 +++ modules/node/node.module 10 May 2007 23:13:10 -0000 @@ -2719,6 +2719,18 @@ function node_access($op, $node) { return FALSE; } + // Check nodeapi 'access' hook. + // This happens before the module's own hook so that nodeapi can perform + // overrides. + $access = node_invoke_nodeapi($node, 'access', $op); + // node_invoke_nodeapi drops NULLs; so if no nodeapi actually responded + // to this, we'll have an empty return value, which means nothing cares + // and we move on. + if (!empty($access) && is_array($access)) { + // If any values were true, return true; otherwise, return false. + return (bool) array_filter($access); + } + // Can't use node_invoke(), because the access hook takes the $op parameter // before the $node parameter. $module = node_get_types('module', $node);