diff options
Diffstat (limited to 'modules/node')
-rw-r--r-- | modules/node/node.api.php | 12 | ||||
-rw-r--r-- | modules/node/node.module | 26 | ||||
-rw-r--r-- | modules/node/node.pages.inc | 4 |
3 files changed, 21 insertions, 21 deletions
diff --git a/modules/node/node.api.php b/modules/node/node.api.php index 9b6342e38..6b052aa5d 100644 --- a/modules/node/node.api.php +++ b/modules/node/node.api.php @@ -551,7 +551,7 @@ function hook_access($op, $node, $account) { * to take action when a node is being deleted from the database by, for * example, deleting information from related tables. * - * @param &$node + * @param $node * The node being deleted. * @return * None. @@ -561,7 +561,7 @@ function hook_access($op, $node, $account) { * * For a detailed usage example, see node_example.module. */ -function hook_delete(&$node) { +function hook_delete($node) { db_delete('mytable') ->condition('nid', $nid->nid) ->execute(); @@ -571,14 +571,14 @@ function hook_delete(&$node) { * This is a hook used by node modules. It is called after load but before the * node is shown on the add/edit form. * - * @param &$node + * @param $node * The node being saved. * @return * None. * * For a usage example, see image.module. */ -function hook_prepare(&$node) { +function hook_prepare($node) { if ($file = file_check_upload($field_name)) { $file = file_save_upload($field_name, _image_filename($file->filename, NULL, TRUE)); if ($file) { @@ -603,7 +603,7 @@ function hook_prepare(&$node) { * that is displayed when one attempts to "create/edit" an item. This form is * displayed at the URI http://www.example.com/?q=node/<add|edit>/nodetype. * - * @param &$node + * @param $node * The node being added or edited. * @param $form_state * The form state array. Changes made to this variable will have no effect. @@ -618,7 +618,7 @@ function hook_prepare(&$node) { * * For a detailed usage example, see node_example.module. */ -function hook_form(&$node, $form_state) { +function hook_form($node, $form_state) { $type = node_get_types('type', $node); $form['title'] = array( diff --git a/modules/node/node.module b/modules/node/node.module index b557a56cb..2afd1edd2 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -738,14 +738,14 @@ function node_type_set_defaults($info = array()) { /** * Determine whether a node hook exists. * - * @param &$node + * @param $node * Either a node object, node array, or a string containing the node type. * @param $hook * A string containing the name of the hook. * @return * TRUE iff the $hook exists in the node type of $node. */ -function node_hook(&$node, $hook) { +function node_hook($node, $hook) { $base = node_get_types('base', $node); return module_hook($base, $hook); } @@ -753,7 +753,7 @@ function node_hook(&$node, $hook) { /** * Invoke a node hook. * - * @param &$node + * @param $node * Either a node object, node array, or a string containing the node type. * @param $hook * A string containing the name of the hook. @@ -762,7 +762,7 @@ function node_hook(&$node, $hook) { * @return * The returned value of the invoked hook. */ -function node_invoke(&$node, $hook, $a2 = NULL, $a3 = NULL, $a4 = NULL) { +function node_invoke($node, $hook, $a2 = NULL, $a3 = NULL, $a4 = NULL) { if (node_hook($node, $hook)) { $base = node_get_types('base', $node); $function = $base . '_' . $hook; @@ -1040,7 +1040,7 @@ function node_submit($node) { * The $node object to be saved. If $node->nid is * omitted (or $node->is_new is TRUE), a new node will be added. */ -function node_save(&$node) { +function node_save($node) { field_attach_presave('node', $node); // Let modules modify the node before it is saved to the database. module_invoke_all('node_presave', $node); @@ -1146,7 +1146,7 @@ function node_save(&$node) { * Node is taken by reference, because drupal_write_record() updates the * $node with the revision id, and we need to pass that back to the caller. */ -function _node_save_revision(&$node, $uid, $update = NULL) { +function _node_save_revision($node, $uid, $update = NULL) { $temp_uid = $node->uid; $node->uid = $uid; if (isset($update)) { @@ -2984,7 +2984,7 @@ function node_action_info() { * Implementation of a Drupal action. * Sets the status of a node to 1, meaning published. */ -function node_publish_action(&$node, $context = array()) { +function node_publish_action($node, $context = array()) { $node->status = 1; watchdog('action', 'Set @type %title to published.', array('@type' => node_get_types('name', $node), '%title' => $node->title)); } @@ -2993,7 +2993,7 @@ function node_publish_action(&$node, $context = array()) { * Implementation of a Drupal action. * Sets the status of a node to 0, meaning unpublished. */ -function node_unpublish_action(&$node, $context = array()) { +function node_unpublish_action($node, $context = array()) { $node->status = 0; watchdog('action', 'Set @type %title to unpublished.', array('@type' => node_get_types('name', $node), '%title' => $node->title)); } @@ -3002,7 +3002,7 @@ function node_unpublish_action(&$node, $context = array()) { * Implementation of a Drupal action. * Sets the sticky-at-top-of-list property of a node to 1. */ -function node_make_sticky_action(&$node, $context = array()) { +function node_make_sticky_action($node, $context = array()) { $node->sticky = 1; watchdog('action', 'Set @type %title to sticky.', array('@type' => node_get_types('name', $node), '%title' => $node->title)); } @@ -3011,7 +3011,7 @@ function node_make_sticky_action(&$node, $context = array()) { * Implementation of a Drupal action. * Sets the sticky-at-top-of-list property of a node to 0. */ -function node_make_unsticky_action(&$node, $context = array()) { +function node_make_unsticky_action($node, $context = array()) { $node->sticky = 0; watchdog('action', 'Set @type %title to unsticky.', array('@type' => node_get_types('name', $node), '%title' => $node->title)); } @@ -3020,7 +3020,7 @@ function node_make_unsticky_action(&$node, $context = array()) { * Implementation of a Drupal action. * Sets the promote property of a node to 1. */ -function node_promote_action(&$node, $context = array()) { +function node_promote_action($node, $context = array()) { $node->promote = 1; watchdog('action', 'Promoted @type %title to front page.', array('@type' => node_get_types('name', $node), '%title' => $node->title)); } @@ -3029,7 +3029,7 @@ function node_promote_action(&$node, $context = array()) { * Implementation of a Drupal action. * Sets the promote property of a node to 0. */ -function node_unpromote_action(&$node, $context = array()) { +function node_unpromote_action($node, $context = array()) { $node->promote = 0; watchdog('action', 'Removed @type %title from front page.', array('@type' => node_get_types('name', $node), '%title' => $node->title)); } @@ -3047,7 +3047,7 @@ function node_save_action($node) { * Implementation of a configurable Drupal action. * Assigns ownership of a node to a user. */ -function node_assign_owner_action(&$node, $context) { +function node_assign_owner_action($node, $context) { $node->uid = $context['owner_uid']; $owner_name = db_query("SELECT name FROM {users} WHERE uid = :uid", array(':uid' => $context['owner_uid']))->fetchField(); watchdog('action', 'Changed owner of @type %title to uid %name.', array('@type' => node_get_types('type', $node), '%title' => $node->title, '%name' => $owner_name)); diff --git a/modules/node/node.pages.inc b/modules/node/node.pages.inc index 0de4e9c91..8b0dbfd91 100644 --- a/modules/node/node.pages.inc +++ b/modules/node/node.pages.inc @@ -77,7 +77,7 @@ function node_form_validate($form, &$form_state) { field_attach_form_validate('node', $node, $form, $form_state); } -function node_object_prepare(&$node) { +function node_object_prepare($node) { // Set up default values, if required. $node_options = variable_get('node_options_' . $node->type, array('status', 'promote')); // If this is a new node, fill in the default values. @@ -288,7 +288,7 @@ function node_form(&$form_state, $node) { /** * Return a node body field, with format and teaser. */ -function node_body_field(&$node, $label, $word_count) { +function node_body_field($node, $label, $word_count) { // Check if we need to restore the teaser at the beginning of the body. $include = !isset($node->teaser) || ($node->teaser == substr($node->body, 0, strlen($node->teaser))); |