summaryrefslogtreecommitdiff
path: root/modules/node/node.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-05-24 17:39:35 +0000
committerDries Buytaert <dries@buytaert.net>2009-05-24 17:39:35 +0000
commita24a6c2bba2d15ab835e0b0fce9354bb6fb16c5b (patch)
tree9194465a044c0fdad447eba2906f0472a4dff515 /modules/node/node.module
parenta5f42fd007bf3646261b431c52cde53657e21564 (diff)
downloadbrdo-a24a6c2bba2d15ab835e0b0fce9354bb6fb16c5b.tar.gz
brdo-a24a6c2bba2d15ab835e0b0fce9354bb6fb16c5b.tar.bz2
- Patch #471070 by stella: millions of code style fixes.
Diffstat (limited to 'modules/node/node.module')
-rw-r--r--modules/node/node.module16
1 files changed, 8 insertions, 8 deletions
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);
}
}