Passed
Push — dpa_docker18 ( 99df08 )
by David
10:05
created
sites/default/boinc/modules/node_comment_block/node_comment_block.module 1 patch
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -9,45 +9,45 @@  discard block
 block discarded – undo
9 9
  * Implements hook_block() for Drupal 6 compatibility
10 10
  */
11 11
 function node_comment_block_block($op = 'list', $delta = 0, $edit = array()) {
12
-  switch ($op) {
13
-  case 'view':
12
+    switch ($op) {
13
+    case 'view':
14 14
     //$block = node_comment_block_block_view($delta);
15 15
     $block = array();
16 16
     if ($delta == 'node_comments') {
17
-      if (arg(0) == 'node' && is_numeric($nid = arg(1)) && !arg(2)) {
17
+        if (arg(0) == 'node' && is_numeric($nid = arg(1)) && !arg(2)) {
18 18
         $node = node_load($nid);
19 19
         if ($node->comment !== 0) {
20
-          $block['subject'] = NULL; // This should be NULL otherwise there will be duplicate h2 elements.
21
-          $block['content'] = '';
22
-          if ($node->comment) {
20
+            $block['subject'] = NULL; // This should be NULL otherwise there will be duplicate h2 elements.
21
+            $block['content'] = '';
22
+            if ($node->comment) {
23 23
             $block['content'] .= comment_render($node);
24
-          }
24
+            }
25
+        }
25 26
         }
26
-      }
27 27
     }
28 28
     break;
29
-  case 'list':
29
+    case 'list':
30 30
     $blocks = node_comment_block_block_info();
31 31
     return $blocks;
32 32
     break;
33
-  default:
33
+    default:
34 34
   }
35
-  return $block;
35
+    return $block;
36 36
 }
37 37
 
38 38
 /**
39 39
  * Port Drupal 7 render() function to Drupal 6
40 40
  */
41 41
 function render(&$element) {
42
-  if (is_array($element)) {
42
+    if (is_array($element)) {
43 43
     show($element);
44 44
     return drupal_render($element);
45
-  }
46
-  else {
45
+    }
46
+    else {
47 47
     // Safe-guard for inappropriate use of render() on flat variables: return
48 48
     // the variable as-is.
49 49
     return $element;
50
-  }
50
+    }
51 51
 }
52 52
 
53 53
 
@@ -56,50 +56,50 @@  discard block
 block discarded – undo
56 56
  * Implements hook_block_info().
57 57
  */
58 58
 function node_comment_block_block_info() {
59
-  $blocks['node_comments'] = array(
59
+    $blocks['node_comments'] = array(
60 60
     'info' => t('Node comments'),
61
-  );
61
+    );
62 62
 
63
-  return $blocks;
63
+    return $blocks;
64 64
 }
65 65
 
66 66
 /**
67 67
  * Implements hook_block_view().
68 68
  */
69 69
 function node_comment_block_block_view($delta = '') {
70
-  $block = array();
70
+    $block = array();
71 71
 
72
-  if ($delta == 'node_comments') {
72
+    if ($delta == 'node_comments') {
73 73
     if (arg(0) == 'node' && is_numeric($nid = arg(1)) && !arg(2)) {
74
-      $node = node_load($nid);
74
+        $node = node_load($nid);
75 75
 
76
-      if ($node->comment !== 0) {
76
+        if ($node->comment !== 0) {
77 77
         $block['subject'] = NULL; // This should be NULL otherwise there will be duplicate h2 elements.
78 78
         $block['content'] = '';
79 79
 
80 80
         $node = node_view($node);
81 81
 
82 82
         if ($node['comments']) {
83
-          $block['content'] .= render($node['comments']);
83
+            $block['content'] .= render($node['comments']);
84
+        }
84 85
         }
85
-      }
86 86
     }
87
-  }
87
+    }
88 88
 
89
-  return $block;
89
+    return $block;
90 90
 }
91 91
 
92 92
 /**
93 93
  * Implements hook_preprocess_HOOK() for nodes.
94 94
  */
95 95
 function node_comment_block_preprocess_node(&$variables) {
96
-  $node = $variables['node'];
97
-  // Only hide standard comments for news content
98
-  if ($variables['type'] == 'news') {
96
+    $node = $variables['node'];
97
+    // Only hide standard comments for news content
98
+    if ($variables['type'] == 'news') {
99 99
     $variables['node']->comment = 0;
100
-  }
100
+    }
101 101
   
102
-  /* Drupal 7...
102
+    /* Drupal 7...
103 103
   if ($node->comment !== 0 && $variables['view_mode'] == 'full') {
104 104
     if (isset($variables['content']['comments'])) {
105 105
       unset($variables['content']['comments']);
@@ -113,10 +113,10 @@  discard block
 block discarded – undo
113 113
  * Implements hook_form_FORM_ID_alter() for block_admin_configure.
114 114
  */
115 115
 function node_comment_block_form_block_admin_configure_alter(&$form, &$form_state) {
116
-  if (isset($form['delta'])) {
116
+    if (isset($form['delta'])) {
117 117
     if ($form['delta']['#value'] == 'node_comments') {
118
-      $form['settings']['title']['#disabled'] = TRUE;
119
-      $form['settings']['title']['#description'] = t('The title for this block cannot be overridden.');
118
+        $form['settings']['title']['#disabled'] = TRUE;
119
+        $form['settings']['title']['#description'] = t('The title for this block cannot be overridden.');
120
+    }
120 121
     }
121
-  }
122 122
 }
Please login to merge, or discard this patch.
boinc/modules/boincteam/includes/views_handler_argument_boincteam_id.inc 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,15 +7,15 @@
 block discarded – undo
7 7
  */
8 8
 
9 9
 class views_handler_argument_boincteam_id extends views_handler_argument_numeric {
10
-  function construct() {
10
+    function construct() {
11 11
     parent::construct();
12
-  }
12
+    }
13 13
 
14
-  function set_argument($arg) {
14
+    function set_argument($arg) {
15 15
     // When setting the ID argument, convert to BOINC ID
16 16
     $id = is_numeric($arg) ? $arg : 0;
17 17
     $boinc_id = db_result(db_query("SELECT team_id FROM {boincteam} WHERE nid = %d", $id));
18 18
     $this->argument = $boinc_id;
19 19
     return $this->validate_arg($boinc_id);
20
-  }
20
+    }
21 21
 }
Please login to merge, or discard this patch.
boinc/modules/boincwork/views/views_handler_argument_boincuser_id.inc 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,15 +7,15 @@
 block discarded – undo
7 7
  */
8 8
 
9 9
 class views_handler_argument_boincuser_id extends views_handler_argument_numeric {
10
-  function construct() {
10
+    function construct() {
11 11
     parent::construct();
12
-  }
12
+    }
13 13
 
14
-  function set_argument($arg) {
14
+    function set_argument($arg) {
15 15
     // When setting the ID argument, convert to BOINC ID
16 16
     $id = is_numeric($arg) ? $arg : 0;
17 17
     $boinc_id = db_result(db_query("SELECT boinc_id FROM {boincuser} WHERE uid = %d", $id));
18 18
     $this->argument = $boinc_id;
19 19
     return $this->validate_arg($boinc_id);
20
-  }
20
+    }
21 21
 }
Please login to merge, or discard this patch.
modules/boincwork/views/views_handler_field_boincwork_host_app_et_avg.inc 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -6,15 +6,15 @@
 block discarded – undo
6 6
  */
7 7
 
8 8
 class views_handler_field_boincwork_host_app_et_avg extends views_handler_field {
9
-  function construct() {
9
+    function construct() {
10 10
     parent::construct();
11
-  }
11
+    }
12 12
 
13
-  function render($values) {
13
+    function render($values) {
14 14
     $gflops = 0;
15 15
     if ($values->host_app_version_et_avg) {
16
-      $gflops = 1e-9 / $values->host_app_version_et_avg;
16
+        $gflops = 1e-9 / $values->host_app_version_et_avg;
17 17
     }
18 18
     return round($gflops, 2) . ' GFLOPS';
19
-  }
19
+    }
20 20
 }
Please login to merge, or discard this patch.
boincwork/views/views_handler_field_boincwork_host_app_turnaround_avg.inc 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,12 +6,12 @@
 block discarded – undo
6 6
  */
7 7
 
8 8
 class views_handler_field_boincwork_host_app_turnaround_avg extends views_handler_field {
9
-  function construct() {
9
+    function construct() {
10 10
     parent::construct();
11
-  }
11
+    }
12 12
 
13
-  function render($values) {
13
+    function render($values) {
14 14
     $time_in_days = $values->host_app_version_turnaround_avg / (24*60*60);
15 15
     return round($time_in_days, 2) . ' ' . t('days');
16
-  }
16
+    }
17 17
 }
Please login to merge, or discard this patch.
boincwork/views/views_handler_field_boincwork_app_version_number.inc 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@
 block discarded – undo
6 6
  */
7 7
 
8 8
 class views_handler_field_boincwork_app_version_number extends views_handler_field {
9
-  function construct() {
9
+    function construct() {
10 10
     parent::construct();
11
-  }
11
+    }
12 12
 
13
-  function render($values) {
13
+    function render($values) {
14 14
     return sprintf("%01.2f", $values->app_version_host_app_version_version_num / 100);
15
-  }
15
+    }
16 16
 }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/themes/boinc/theme-settings.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -15,42 +15,42 @@
 block discarded – undo
15 15
  */
16 16
 function boinc_settings($saved_settings) {
17 17
 
18
-  // Get the default values from the .info file.
19
-  $defaults = zen_theme_get_default_settings('boinc');
18
+    // Get the default values from the .info file.
19
+    $defaults = zen_theme_get_default_settings('boinc');
20 20
 
21
-  // Merge the saved variables and their default values.
22
-  $settings = array_merge($defaults, $saved_settings);
21
+    // Merge the saved variables and their default values.
22
+    $settings = array_merge($defaults, $saved_settings);
23 23
 
24
-  /*
24
+    /*
25 25
    * Create the form using Forms API: http://api.drupal.org/api/6
26 26
    */
27
-  $form = array();
28
-  $form['boinc_stats_charts'] = array(
27
+    $form = array();
28
+    $form['boinc_stats_charts'] = array(
29 29
     '#type' => 'fieldset',
30 30
     '#title' => t('Chart settings'),
31 31
     '#attributes' => array(
32
-      'class' => 'zen-settings',
32
+        'class' => 'zen-settings',
33 33
     ),
34
-  );
35
-  $form['boinc_stats_charts']['boinc_stats_chart_color'] = array(
34
+    );
35
+    $form['boinc_stats_charts']['boinc_stats_chart_color'] = array(
36 36
     '#type'          => 'textfield',
37 37
     '#title'         => t('Chart color'),
38 38
     '#default_value' => $settings['boinc_stats_chart_color'],
39 39
     '#description'   => t('The primary color of the stats chart in hex format (e.g. #FAA341).'),
40
-  );
41
-  $form['boinc_stats_charts']['boinc_stats_chart_bcolor'] = array(
40
+    );
41
+    $form['boinc_stats_charts']['boinc_stats_chart_bcolor'] = array(
42 42
     '#type'          => 'textfield',
43 43
     '#title'         => t('Chart background color'),
44 44
     '#default_value' => $settings['boinc_stats_chart_bcolor'],
45 45
     '#description'   => t('The background color of the stats chart in hex format (e.g. #FFFFFF).'),
46
-  );
46
+    );
47 47
 
48
-  // Add the base theme's settings.
49
-  $form += zen_settings($saved_settings, $defaults);
48
+    // Add the base theme's settings.
49
+    $form += zen_settings($saved_settings, $defaults);
50 50
 
51
-  // Remove some of the base theme's settings.
52
-  unset($form['themedev']['zen_layout']); // We don't need to select the base stylesheet.
51
+    // Remove some of the base theme's settings.
52
+    unset($form['themedev']['zen_layout']); // We don't need to select the base stylesheet.
53 53
 
54
-  // Return the form
55
-  return $form;
54
+    // Return the form
55
+    return $form;
56 56
 }
Please login to merge, or discard this patch.
sites/all/features/internationalization/internationalization.strongarm.inc 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -4,34 +4,34 @@
 block discarded – undo
4 4
  * Implementation of hook_strongarm().
5 5
  */
6 6
 function internationalization_strongarm() {
7
-  $export = array();
7
+    $export = array();
8 8
 
9
-  $strongarm = new stdClass;
10
-  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
11
-  $strongarm->api_version = 1;
12
-  $strongarm->name = 'i18nstrings_allowed_formats';
13
-  $strongarm->value = array(
9
+    $strongarm = new stdClass;
10
+    $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
11
+    $strongarm->api_version = 1;
12
+    $strongarm->name = 'i18nstrings_allowed_formats';
13
+    $strongarm->value = array(
14 14
     0 => 4,
15 15
     1 => 5,
16
-  );
17
-  $export['i18nstrings_allowed_formats'] = $strongarm;
16
+    );
17
+    $export['i18nstrings_allowed_formats'] = $strongarm;
18 18
 
19
-  $strongarm = new stdClass;
20
-  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
21
-  $strongarm->api_version = 1;
22
-  $strongarm->name = 'i18ntaxonomy_vocabulary';
23
-  $strongarm->value = array(
19
+    $strongarm = new stdClass;
20
+    $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
21
+    $strongarm->api_version = 1;
22
+    $strongarm->name = 'i18ntaxonomy_vocabulary';
23
+    $strongarm->value = array(
24 24
     2 => '1',
25 25
     1 => '0',
26
-  );
27
-  $export['i18ntaxonomy_vocabulary'] = $strongarm;
26
+    );
27
+    $export['i18ntaxonomy_vocabulary'] = $strongarm;
28 28
 
29
-  $strongarm = new stdClass;
30
-  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
31
-  $strongarm->api_version = 1;
32
-  $strongarm->name = 'language_negotiation';
33
-  $strongarm->value = '2';
34
-  $export['language_negotiation'] = $strongarm;
29
+    $strongarm = new stdClass;
30
+    $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
31
+    $strongarm->api_version = 1;
32
+    $strongarm->name = 'language_negotiation';
33
+    $strongarm->value = '2';
34
+    $export['language_negotiation'] = $strongarm;
35 35
 
36
-  return $export;
36
+    return $export;
37 37
 }
Please login to merge, or discard this patch.
internationalization/internationalization.features.user_permission.inc 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -4,47 +4,47 @@
 block discarded – undo
4 4
  * Implementation of hook_user_default_permissions().
5 5
  */
6 6
 function internationalization_user_default_permissions() {
7
-  $permissions = array();
7
+    $permissions = array();
8 8
 
9
-  // Exported permission: administer all languages
10
-  $permissions['administer all languages'] = array(
9
+    // Exported permission: administer all languages
10
+    $permissions['administer all languages'] = array(
11 11
     'name' => 'administer all languages',
12 12
     'roles' => array(
13
-      '0' => 'administrator',
13
+        '0' => 'administrator',
14 14
     ),
15
-  );
15
+    );
16 16
 
17
-  // Exported permission: administer languages
18
-  $permissions['administer languages'] = array(
17
+    // Exported permission: administer languages
18
+    $permissions['administer languages'] = array(
19 19
     'name' => 'administer languages',
20 20
     'roles' => array(
21
-      '0' => 'administrator',
21
+        '0' => 'administrator',
22 22
     ),
23
-  );
23
+    );
24 24
 
25
-  // Exported permission: administer translations
26
-  $permissions['administer translations'] = array(
25
+    // Exported permission: administer translations
26
+    $permissions['administer translations'] = array(
27 27
     'name' => 'administer translations',
28 28
     'roles' => array(
29
-      '0' => 'administrator',
29
+        '0' => 'administrator',
30 30
     ),
31
-  );
31
+    );
32 32
 
33
-  // Exported permission: translate content
34
-  $permissions['translate content'] = array(
33
+    // Exported permission: translate content
34
+    $permissions['translate content'] = array(
35 35
     'name' => 'translate content',
36 36
     'roles' => array(
37
-      '0' => 'administrator',
37
+        '0' => 'administrator',
38 38
     ),
39
-  );
39
+    );
40 40
 
41
-  // Exported permission: translate interface
42
-  $permissions['translate interface'] = array(
41
+    // Exported permission: translate interface
42
+    $permissions['translate interface'] = array(
43 43
     'name' => 'translate interface',
44 44
     'roles' => array(
45
-      '0' => 'administrator',
45
+        '0' => 'administrator',
46 46
     ),
47
-  );
47
+    );
48 48
 
49
-  return $permissions;
49
+    return $permissions;
50 50
 }
Please login to merge, or discard this patch.