From a24a6c2bba2d15ab835e0b0fce9354bb6fb16c5b Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 24 May 2009 17:39:35 +0000 Subject: - Patch #471070 by stella: millions of code style fixes. --- modules/node/node.module | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'modules/node/node.module') diff --git a/modules/node/node.module b/modules/node/node.module index 368896e4c..9cddfde7d 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -1046,7 +1046,7 @@ function node_save($node) { global $user; if (!isset($node->is_new)) { - $node->is_new = empty($node->nid); + $node->is_new = empty($node->nid); } // Apply filters to some default node fields: @@ -1131,7 +1131,7 @@ function node_save($node) { // Update the node access table for this node. node_access_acquire_grants($node); - + // Clear internal properties. unset($node->is_new); @@ -1458,14 +1458,14 @@ function _node_rankings() { ); if ($ranking = module_invoke_all('ranking')) { foreach ($ranking as $rank => $values) { - if ($node_rank = variable_get('node_rank_'. $rank, 0)) { + if ($node_rank = variable_get('node_rank_' . $rank, 0)) { // If the table defined in the ranking isn't already joined, then add it. if (isset($values['join']) && !isset($rankings['join'][$values['join']])) { $rankings['join'][$values['join']] = $values['join']; } // Add the rankings weighted score multiplier value, handling NULL gracefully. - $rankings['score'][] = 'CAST(%f AS DECIMAL) * COALESCE(('. $values['score'] .'), 0)'; + $rankings['score'][] = 'CAST(%f AS DECIMAL) * COALESCE((' . $values['score'] . '), 0)'; // Add the the administrator's weighted score multiplier value for this ranking. $rankings['total'] += $node_rank; @@ -1517,11 +1517,11 @@ function node_search($op = 'search', $keys = NULL) { // Note: reversed to reflect that higher number = higher ranking. $options = drupal_map_assoc(range(0, 10)); foreach (module_invoke_all('ranking') as $var => $values) { - $form['content_ranking']['factors']['node_rank_'. $var] = array( + $form['content_ranking']['factors']['node_rank_' . $var] = array( '#title' => $values['title'], '#type' => 'select', '#options' => $options, - '#default_value' => variable_get('node_rank_'. $var, 0), + '#default_value' => variable_get('node_rank_' . $var, 0), ); } return $form; @@ -1578,7 +1578,7 @@ function node_search($op = 'search', $keys = NULL) { $total = $rankings['total']; $arguments2 = $rankings['arguments']; $join2 = implode(' ', $rankings['join']); - $select2 = 'SUM('. implode(' + ', $rankings['score']) .') AS calculated_score'; + $select2 = 'SUM(' . implode(' + ', $rankings['score']) . ') AS calculated_score'; } // Do search. @@ -2175,7 +2175,7 @@ function node_update_index() { $result = db_query_range("SELECT n.nid FROM {node} n LEFT JOIN {search_dataset} d ON d.type = 'node' AND d.sid = n.nid WHERE d.sid IS NULL OR d.reindex <> 0 ORDER BY d.reindex ASC, n.nid ASC", 0, $limit); - foreach($result as $node) { + foreach ($result as $node) { _node_index_node($node); } } -- cgit v1.2.3