diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-05-09 18:28:13 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-05-09 18:28:13 +0000 |
commit | 0e0ca3b589668041022e3191d749d4c5acaee6e9 (patch) | |
tree | 9e1af632339babc89bb2d5d0a0c32eaf5419a014 | |
parent | 557128c9190b814d1261e30a4b9a760699b92a6b (diff) | |
download | brdo-0e0ca3b589668041022e3191d749d4c5acaee6e9.tar.gz brdo-0e0ca3b589668041022e3191d749d4c5acaee6e9.tar.bz2 |
- Patch #457532 by Berdir: more PHP5 'fixes'.
-rw-r--r-- | includes/form.inc | 2 | ||||
-rw-r--r-- | modules/blogapi/blogapi.module | 2 | ||||
-rw-r--r-- | modules/book/book.module | 2 | ||||
-rw-r--r-- | modules/field/field.attach.inc | 2 | ||||
-rw-r--r-- | modules/field/field.autoload.inc | 2 | ||||
-rw-r--r-- | modules/forum/forum.module | 2 | ||||
-rw-r--r-- | modules/menu/menu.module | 8 | ||||
-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 | ||||
-rw-r--r-- | modules/poll/poll.module | 4 | ||||
-rw-r--r-- | modules/translation/translation.module | 2 | ||||
-rw-r--r-- | modules/upload/upload.module | 2 |
13 files changed, 35 insertions, 35 deletions
diff --git a/includes/form.inc b/includes/form.inc index 481cd6173..4dd5b9445 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -2388,7 +2388,7 @@ function form_process_vertical_tabs($element, &$form_state) { * An associative array containing the properties and children of the * fieldset. */ -function theme_vertical_tabs(&$element) { +function theme_vertical_tabs($element) { // Add required JavaScript and Stylesheet. drupal_add_js('misc/vertical-tabs.js', array('weight' => JS_DEFAULT - 1)); drupal_add_css('misc/vertical-tabs.css'); diff --git a/modules/blogapi/blogapi.module b/modules/blogapi/blogapi.module index 58ce6baae..f007ae1f1 100644 --- a/modules/blogapi/blogapi.module +++ b/modules/blogapi/blogapi.module @@ -870,7 +870,7 @@ __RSD__; /** * Handles extra information sent by clients according to MovableType's spec. */ -function _blogapi_mt_extra(&$node, $struct) { +function _blogapi_mt_extra($node, $struct) { if (is_array($node)) { $was_array = TRUE; $node = (object)$node; diff --git a/modules/book/book.module b/modules/book/book.module index 815442677..57e7be588 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -490,7 +490,7 @@ function _book_add_form_elements(&$form, $node) { * Performs all additions and updates to the book outline through node addition, * node editing, node deletion, or the outline tab. */ -function _book_update_outline(&$node) { +function _book_update_outline($node) { if (empty($node->book['bid'])) { return FALSE; } diff --git a/modules/field/field.attach.inc b/modules/field/field.attach.inc index b95d083d0..c10f85085 100644 --- a/modules/field/field.attach.inc +++ b/modules/field/field.attach.inc @@ -661,7 +661,7 @@ function _field_attach_preprocess($obj_type, &$object) { * * TODO D7: We do not yet know if this really belongs in Field API. */ -function _field_attach_prepare_translation(&$node) { +function _field_attach_prepare_translation($node) { // Prevent against invalid 'nodes' built by broken 3rd party code. if (isset($node->type)) { $type = content_types($node->type); diff --git a/modules/field/field.autoload.inc b/modules/field/field.autoload.inc index 9ebe204f2..21a8947de 100644 --- a/modules/field/field.autoload.inc +++ b/modules/field/field.autoload.inc @@ -297,7 +297,7 @@ function field_attach_preprocess($obj_type, &$object) { * * This function is an autoloader for _field_attach_prepare_translation() in modules/field/field.attach.inc. */ -function field_attach_prepare_translation(&$node) { +function field_attach_prepare_translation($node) { require_once DRUPAL_ROOT . '/modules/field/field.attach.inc'; return _field_attach_prepare_translation($node); } diff --git a/modules/forum/forum.module b/modules/forum/forum.module index 268645cfc..1217657fa 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -538,7 +538,7 @@ function forum_block_view($delta = '') { /** * Implementation of hook_form(). */ -function forum_form(&$node, $form_state) { +function forum_form($node, $form_state) { $type = node_get_types('type', $node); $form['title'] = array('#type' => 'textfield', '#title' => check_plain($type->title_label), '#default_value' => !empty($node->title) ? $node->title : '', '#required' => TRUE, '#weight' => -5); diff --git a/modules/menu/menu.module b/modules/menu/menu.module index e03148998..9ef1f757e 100644 --- a/modules/menu/menu.module +++ b/modules/menu/menu.module @@ -294,7 +294,7 @@ function menu_block_view($delta = '') { /** * Implementation of hook_node_insert(). */ -function menu_node_insert(&$node) { +function menu_node_insert($node) { if (isset($node->menu)) { $item = &$node->menu; if (!empty($item['delete'])) { @@ -316,7 +316,7 @@ function menu_node_insert(&$node) { /** * Implementation of hook_node_update(). */ -function menu_node_update(&$node) { +function menu_node_update($node) { if (isset($node->menu)) { $item = &$node->menu; if (!empty($item['delete'])) { @@ -338,7 +338,7 @@ function menu_node_update(&$node) { /** * Implementation of hook_node_delete(). */ -function menu_node_delete(&$node) { +function menu_node_delete($node) { // Delete all menu module links that point to this node. $result = db_query("SELECT mlid FROM {menu_links} WHERE link_path = :path AND module = 'menu'", array(':path' => 'node/'. $node->nid), array('fetch' => PDO::FETCH_ASSOC)); foreach ($result as $m) { @@ -349,7 +349,7 @@ function menu_node_delete(&$node) { /** * Implementation of hook_node_prepare(). */ -function menu_node_prepare(&$node) { +function menu_node_prepare($node) { if (empty($node->menu)) { // Prepare the node for the edit form so that $node->menu always exists. $menu_name = variable_get('menu_default_node_menu', 'main-menu'); 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))); diff --git a/modules/poll/poll.module b/modules/poll/poll.module index 5f55ba53a..02b6a81c7 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -201,7 +201,7 @@ function poll_node_info() { /** * Implementation of hook_form(). */ -function poll_form(&$node, $form_state) { +function poll_form($node, $form_state) { global $user; $admin = user_access('administer nodes') || user_access('edit any poll content') || (user_access('edit own poll content') && $user->uid == $node->uid); @@ -694,7 +694,7 @@ function template_preprocess_poll_vote(&$variables) { /** * Generates a graphical representation of the results of a poll. */ -function poll_view_results(&$node, $teaser, $block) { +function poll_view_results($node, $teaser, $block) { // Count the votes and find the maximum $total_votes = 0; $max_votes = 0; diff --git a/modules/translation/translation.module b/modules/translation/translation.module index 0183417bf..d10ad326a 100644 --- a/modules/translation/translation.module +++ b/modules/translation/translation.module @@ -167,7 +167,7 @@ function translation_form_alter(&$form, &$form_state, $form_id) { * Display translation links with native language names, if this node * is part of a translation set. */ -function translation_node_view(&$node, $teaser = FALSE) { +function translation_node_view($node, $teaser = FALSE) { if (isset($node->tnid) && $translations = translation_node_get_translations($node->tnid)) { // Do not show link to the same node. unset($translations[$node->language]); diff --git a/modules/upload/upload.module b/modules/upload/upload.module index defea1037..7c288dde4 100644 --- a/modules/upload/upload.module +++ b/modules/upload/upload.module @@ -475,7 +475,7 @@ function upload_total_space_used() { return db_query('SELECT SUM(f.filesize) FROM {files} f INNER JOIN {upload} u ON f.fid = u.fid')->fetchField(); } -function upload_save(&$node) { +function upload_save($node) { if (empty($node->files) || !is_array($node->files)) { return; } |