Issue #789484 by Lars Toomre, pillarsdotnet, michaellenahan, sven.lauer, Mac_Weber: Fixed Confusing documentation for argument in hook_access()/hook_node_access().

merge-requests/26/head
webchick 2011-10-19 23:56:45 -07:00
parent c9f793c456
commit abc2183d36
1 changed files with 8 additions and 9 deletions

View File

@ -570,11 +570,9 @@ function hook_node_load($nodes, $types) {
* block access, return NODE_ACCESS_IGNORE or simply return nothing. * block access, return NODE_ACCESS_IGNORE or simply return nothing.
* Blindly returning FALSE will break other node access modules. * Blindly returning FALSE will break other node access modules.
* *
* @link http://api.drupal.org/api/group/node_access/7 More on the node access system @endlink
* @ingroup node_access
* @param $node * @param $node
* The node on which the operation is to be performed, or, if it does * Either a node object or a (machine-readable) content type on which to
* not yet exist, the type of node to be created. * perform the access check.
* @param $op * @param $op
* The operation to be performed. Possible values: * The operation to be performed. Possible values:
* - "create" * - "create"
@ -582,13 +580,14 @@ function hook_node_load($nodes, $types) {
* - "update" * - "update"
* - "view" * - "view"
* @param $account * @param $account
* A user object representing the user for whom the operation is to be * The user object to perform the access check operation on.
* performed.
* *
* @return * @return
* NODE_ACCESS_ALLOW if the operation is to be allowed; * NODE_ACCESS_ALLOW if the operation is to be allowed;
* NODE_ACCESS_DENY if the operation is to be denied; * NODE_ACCESS_DENY if the operation is to be denied;
* NODE_ACCESS_IGNORE to not affect this operation at all. * NODE_ACCESS_IGNORE to not affect this operation at all.
*
* @ingroup node_access
*/ */
function hook_node_access($node, $op, $account) { function hook_node_access($node, $op, $account) {
$type = is_string($node) ? $node : $node->type; $type = is_string($node) ? $node : $node->type;
@ -880,9 +879,9 @@ function hook_node_view_alter(&$build) {
* machine name of this type. FALSE = changeable (not locked), * machine name of this type. FALSE = changeable (not locked),
* TRUE = unchangeable (locked). Optional (defaults to TRUE). * TRUE = unchangeable (locked). Optional (defaults to TRUE).
* *
* The machine-readable name of a node type should contain only letters, * The machine name of a node type should contain only letters, numbers, and
* numbers, and underscores. Underscores will be converted into hyphens for the * underscores. Underscores will be converted into hyphens for the purpose of
* purpose of constructing URLs. * constructing URLs.
* *
* All attributes of a node type that are defined through this hook (except for * All attributes of a node type that are defined through this hook (except for
* 'locked') can be edited by a site administrator. This includes the * 'locked') can be edited by a site administrator. This includes the