summaryrefslogtreecommitdiff
path: root/modules/node
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
parenta5f42fd007bf3646261b431c52cde53657e21564 (diff)
downloadbrdo-a24a6c2bba2d15ab835e0b0fce9354bb6fb16c5b.tar.gz
brdo-a24a6c2bba2d15ab835e0b0fce9354bb6fb16c5b.tar.bz2
- Patch #471070 by stella: millions of code style fixes.
Diffstat (limited to 'modules/node')
-rw-r--r--modules/node/content_types.inc4
-rw-r--r--modules/node/node.admin.inc8
-rw-r--r--modules/node/node.module16
-rw-r--r--modules/node/node.test10
4 files changed, 19 insertions, 19 deletions
diff --git a/modules/node/content_types.inc b/modules/node/content_types.inc
index 5f4ff57a5..1099a84c6 100644
--- a/modules/node/content_types.inc
+++ b/modules/node/content_types.inc
@@ -52,7 +52,7 @@ function theme_node_admin_overview($name, $type) {
* Generates the node type editing form.
*/
function node_type_form(&$form_state, $type = NULL) {
- drupal_add_js(drupal_get_path('module', 'node') .'/content_types.js');
+ drupal_add_js(drupal_get_path('module', 'node') . '/content_types.js');
if (!isset($type->type)) {
// This is a new type. Node module managed types are custom and unlocked.
$type = node_type_set_defaults(array('custom' => 1, 'locked' => 0));
@@ -167,7 +167,7 @@ function node_type_form(&$form_state, $type = NULL) {
$form['display']['node_submitted'] = array(
'#type' => 'checkbox',
'#title' => t('Display post information'),
- '#default_value' => variable_get('node_submitted_'. $type->type, TRUE),
+ '#default_value' => variable_get('node_submitted_' . $type->type, TRUE),
'#description' => t('Enable the <em>submitted by Username on date</em> text.'),
);
$form['old_type'] = array(
diff --git a/modules/node/node.admin.inc b/modules/node/node.admin.inc
index 60ef89ef5..7b2fa4a17 100644
--- a/modules/node/node.admin.inc
+++ b/modules/node/node.admin.inc
@@ -481,7 +481,7 @@ function node_admin_nodes() {
$filter = node_build_filter_query();
$sort = tablesort_sql($header, '', 'n.changed DESC');
- $result = pager_query(db_rewrite_sql('SELECT n.*, u.name FROM {node} n '. $filter['join'] .' INNER JOIN {users} u ON n.uid = u.uid '. $filter['where'] . $sort), 50, 0, NULL, $filter['args']);
+ $result = pager_query(db_rewrite_sql('SELECT n.*, u.name FROM {node} n ' . $filter['join'] . ' INNER JOIN {users} u ON n.uid = u.uid ' . $filter['where'] . $sort), 50, 0, NULL, $filter['args']);
// Build the 'Update options' form.
$form['options'] = array(
@@ -633,10 +633,10 @@ function node_multiple_delete_confirm(&$form_state, $nodes) {
}
$form['operation'] = array('#type' => 'hidden', '#value' => 'delete');
$form['#submit'][] = 'node_multiple_delete_confirm_submit';
- $confirm_question = format_plural(count($nodes),
- 'Are you sure you want to delete this item?',
+ $confirm_question = format_plural(count($nodes),
+ 'Are you sure you want to delete this item?',
'Are you sure you want to delete these items?');
- return confirm_form($form,
+ return confirm_form($form,
$confirm_question,
'admin/content/node', t('This action cannot be undone.'),
t('Delete'), t('Cancel'));
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);
}
}
diff --git a/modules/node/node.test b/modules/node/node.test
index af4de828c..1e6d57e1e 100644
--- a/modules/node/node.test
+++ b/modules/node/node.test
@@ -505,7 +505,7 @@ class PageViewTestCase extends DrupalWebTestCase {
class NodeTitleXSSTestCase extends DrupalWebTestCase {
public static function getInfo() {
- return array(
+ return array(
'name' => t('Node title XSS filtering'),
'description' => t('Create a node with dangerous tags in its title and test that they are escaped.'),
'group' => t('Node'),
@@ -631,7 +631,7 @@ class NodePostSettingsTestCase extends DrupalWebTestCase {
/**
* Ensure that data added to nodes by other modules appears in RSS feeds.
- *
+ *
* Create a node, enable the node_test module to ensure that extra data is
* added to the node->content array, then verify that the data appears on the
* sitewide RSS feed at rss.xml.
@@ -688,7 +688,7 @@ class NodeRSSContentTestCase extends DrupalWebTestCase {
* Test case to check node save related functionality, including import-save
*/
class NodeSaveTestCase extends DrupalWebTestCase {
-
+
public static function getInfo() {
return array(
'name' => t('Node save'),
@@ -707,7 +707,7 @@ class NodeSaveTestCase extends DrupalWebTestCase {
/**
* Import test, to check if custom node ids are saved properly.
- * Workflow:
+ * Workflow:
* - first create a piece of content
* - save the content
* - check if node exists
@@ -716,7 +716,7 @@ class NodeSaveTestCase extends DrupalWebTestCase {
// Node ID must be a number that is not in the database.
$max_nid = db_result(db_query('SELECT MAX(nid) FROM {node}'));
$test_nid = $max_nid + mt_rand(1000, 1000000);
- $title = $this->randomName(8);
+ $title = $this->randomName(8);
$node = array(
'title' => $title,
'body' => $this->randomName(32),