Passed
Push — vko_fix_build ( f1c349...f93f07 )
by Vitalii
25:51 queued 10:00
created
sites/default/boinc/modules/comment_form_block/comment_form_block.module 3 patches
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -9,40 +9,40 @@  discard block
 block discarded – undo
9 9
  * Implements hook_block() for Drupal 6 compatibility
10 10
  */
11 11
 function comment_form_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 == 'comment_form') {
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
         global $user;
19 19
         $node = node_load($nid);
20 20
         if ($node->comment !== 0 AND user_access('post comments', $user)) {
21
-          $block['subject'] = NULL; // This should be NULL otherwise there will be duplicate h2 elements.
22
-          $block['content'] = '<h2>' . bts('Post new comment', array(), NULL, 'boinc:forum-post-new-comment') . '</h2>';
23
-          $block['content'] .= drupal_get_form('comment_form', array('nid' => $nid));
21
+            $block['subject'] = NULL; // This should be NULL otherwise there will be duplicate h2 elements.
22
+            $block['content'] = '<h2>' . bts('Post new comment', array(), NULL, 'boinc:forum-post-new-comment') . '</h2>';
23
+            $block['content'] .= drupal_get_form('comment_form', array('nid' => $nid));
24
+        }
24 25
         }
25
-      }
26 26
     }
27 27
     break;
28
-  case 'list':
28
+    case 'list':
29 29
     $blocks = comment_form_block_block_info();
30 30
     return $blocks;
31 31
     break;
32
-  default:
32
+    default:
33 33
   }
34
-  return $block;
34
+    return $block;
35 35
 }
36 36
 
37 37
 /**
38 38
  * Implements hook_block_info().
39 39
  */
40 40
 function comment_form_block_block_info() {
41
-  $blocks['comment_form'] = array(
41
+    $blocks['comment_form'] = array(
42 42
     'info' => bts('Comment form', array(), NULL, 'boinc:forum-comment-form'),
43
-  );
43
+    );
44 44
 
45
-  return $blocks;
45
+    return $blocks;
46 46
 }
47 47
 
48 48
 /**
@@ -81,10 +81,10 @@  discard block
 block discarded – undo
81 81
  * Implements hook_form_FORM_ID_alter() for block_admin_configure.
82 82
  */
83 83
 function comment_form_block_form_block_admin_configure_alter(&$form, &$form_state) {
84
-  if (isset($form['delta'])) {
84
+    if (isset($form['delta'])) {
85 85
     if ($form['delta']['#value'] == 'comment_form') {
86
-      $form['settings']['title']['#disabled'] = TRUE;
87
-      $form['settings']['title']['#description'] = t('The title for this block cannot be overridden.');
86
+        $form['settings']['title']['#disabled'] = TRUE;
87
+        $form['settings']['title']['#description'] = t('The title for this block cannot be overridden.');
88
+    }
88 89
     }
89
-  }
90 90
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
         $node = node_load($nid);
20 20
         if ($node->comment !== 0 AND user_access('post comments', $user)) {
21 21
           $block['subject'] = NULL; // This should be NULL otherwise there will be duplicate h2 elements.
22
-          $block['content'] = '<h2>' . bts('Post new comment', array(), NULL, 'boinc:forum-post-new-comment') . '</h2>';
22
+          $block['content'] = '<h2>'.bts('Post new comment', array(), NULL, 'boinc:forum-post-new-comment').'</h2>';
23 23
           $block['content'] .= drupal_get_form('comment_form', array('nid' => $nid));
24 24
         }
25 25
       }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@  discard block
 block discarded – undo
17 17
       if (arg(0) == 'node' && is_numeric($nid = arg(1)) && !arg(2)) {
18 18
         global $user;
19 19
         $node = node_load($nid);
20
-        if ($node->comment !== 0 AND user_access('post comments', $user)) {
21
-          $block['subject'] = NULL; // This should be NULL otherwise there will be duplicate h2 elements.
22
-          $block['content'] = '<h2>' . bts('Post new comment', array(), NULL, 'boinc:forum-post-new-comment') . '</h2>';
20
+        if ($node->comment !== 0 and user_access('post comments', $user)) {
21
+          $block['subject'] = null; // This should be NULL otherwise there will be duplicate h2 elements.
22
+          $block['content'] = '<h2>' . bts('Post new comment', array(), null, 'boinc:forum-post-new-comment') . '</h2>';
23 23
           $block['content'] .= drupal_get_form('comment_form', array('nid' => $nid));
24 24
         }
25 25
       }
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
  */
40 40
 function comment_form_block_block_info() {
41 41
   $blocks['comment_form'] = array(
42
-    'info' => bts('Comment form', array(), NULL, 'boinc:forum-comment-form'),
42
+    'info' => bts('Comment form', array(), null, 'boinc:forum-comment-form'),
43 43
   );
44 44
 
45 45
   return $blocks;
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 function comment_form_block_form_block_admin_configure_alter(&$form, &$form_state) {
84 84
   if (isset($form['delta'])) {
85 85
     if ($form['delta']['#value'] == 'comment_form') {
86
-      $form['settings']['title']['#disabled'] = TRUE;
86
+      $form['settings']['title']['#disabled'] = true;
87 87
       $form['settings']['title']['#description'] = t('The title for this block cannot be overridden.');
88 88
     }
89 89
   }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincstats/boincstats.admin.inc 1 patch
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -8,38 +8,38 @@  discard block
 block discarded – undo
8 8
 
9 9
 
10 10
 /**
11
-  * The BOINC stats configuration determines where statistics are sourced
12
-  */
11
+ * The BOINC stats configuration determines where statistics are sourced
12
+ */
13 13
 function boincstats_admin_stats_system(&$form_state) {
14
-  $form = array();
15
-  $default = array(
14
+    $form = array();
15
+    $default = array(
16 16
     'boinc_stats_server' => variable_get('boinc_stats_server', 'stats.gridrepublic.org'),
17 17
     'boinc_stats_project_list_rpc' => variable_get('boinc_stats_project_list_rpc', 'rpc/get_projects.php'),
18 18
     'boinc_stats_project_credit_history_rpc' => variable_get('boinc_stats_project_credit_history_rpc', 'rpc2/get_project_tc_history.php'),
19 19
     'boinc_stats_user_credit_history_rpc' => variable_get('boinc_stats_user_credit_history_rpc', 'rpc2/get_user_credit_history.php'),
20 20
     'boinc_stats_remote_project_id' => variable_get('boinc_stats_remote_project_id', ''),
21
-  );
22
-  // Define the form
23
-  $form['boinc_stats_server'] = array(
21
+    );
22
+    // Define the form
23
+    $form['boinc_stats_server'] = array(
24 24
     '#type' => 'value',
25 25
     '#value' => $default['boinc_stats_server']
26
-  );
27
-  $form['boinc_stats_project_list_rpc'] = array(
26
+    );
27
+    $form['boinc_stats_project_list_rpc'] = array(
28 28
     '#type' => 'value',
29 29
     '#value' => $default['boinc_stats_project_list_rpc']
30
-  );
31
-  $form['boinc_stats_project_credit_history_rpc'] = array(
30
+    );
31
+    $form['boinc_stats_project_credit_history_rpc'] = array(
32 32
     '#type' => 'value',
33 33
     '#value' => $default['boinc_stats_project_credit_history_rpc']
34
-  );
35
-  $form['boinc_stats_user_credit_history_rpc'] = array(
34
+    );
35
+    $form['boinc_stats_user_credit_history_rpc'] = array(
36 36
     '#type' => 'value',
37 37
     '#value' => $default['boinc_stats_user_credit_history_rpc']
38
-  );
39
-  $form['boinc_stats_remote_project_id'] = array(
38
+    );
39
+    $form['boinc_stats_remote_project_id'] = array(
40 40
     '#type' => 'textfield',
41 41
     '#title' => t('Stats ID for @project', array(
42
-      '@project' => variable_get('site_name', 'Drupal-BOINC'))),
42
+        '@project' => variable_get('site_name', 'Drupal-BOINC'))),
43 43
     '#default_value' => $default['boinc_stats_remote_project_id'],
44 44
     '#description' => t('This project must be registered with a stats system in
45 45
       order for some statistics to be available. Currently only one system is
@@ -47,26 +47,26 @@  discard block
 block discarded – undo
47 47
         '!find_project_id' => l(t('Find your project ID'),
48 48
         "http://{$default['boinc_stats_server']}/{$default['boinc_stats_project_list_rpc']}",
49 49
         array('attributes' => array('target' => 'external')))
50
-      )
50
+        )
51 51
     )
52
-  );
53
-  return system_settings_form($form);
52
+    );
53
+    return system_settings_form($form);
54 54
 }
55 55
 
56 56
 /**
57
-  * Validate the BOINC stats form.
58
-  */
57
+ * Validate the BOINC stats form.
58
+ */
59 59
 function boincstats_admin_stats_system_validate($form, &$form_state) {
60
-  $values = $form_state['values'];
61
-  if (!$values['boinc_stats_remote_project_id']) {
60
+    $values = $form_state['values'];
61
+    if (!$values['boinc_stats_remote_project_id']) {
62 62
     form_set_error('boinc_stats_remote_project_id',
63
-      t('Stats may not work without a valid stats ID configured!'));
64
-  }
63
+        t('Stats may not work without a valid stats ID configured!'));
64
+    }
65 65
 }
66 66
 
67 67
 /**
68
-  * Handle post-validation submission of BOINC stats form.
69
-  */
68
+ * Handle post-validation submission of BOINC stats form.
69
+ */
70 70
 function boincstats_admin_stats_system_submit($form, &$form_state) {
71
-  drupal_set_message(t('Stats system configuration has been updated.'));
71
+    drupal_set_message(t('Stats system configuration has been updated.'));
72 72
 }
Please login to merge, or discard this patch.
drupal/sites/all/features/global_search_solr/global_search_solr.module 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@
 block discarded – undo
5 5
 // Hackish... but there doesn't seem to be a non-hackish way to change the
6 6
 // label on the search form!? Need a custom module to call hook_form_alter()...
7 7
 function global_search_solr_form_alter(&$form, &$form_state, $form_id) {
8
-  if ($form_id == 'apachesolr_search_custom_page_search_form') {
8
+    if ($form_id == 'apachesolr_search_custom_page_search_form') {
9 9
     $form['basic']['keys']['#title'] = t('Search');
10 10
     $form['basic']['keys']['#size'] = 40;
11
-  }
11
+    }
12 12
 }
Please login to merge, or discard this patch.
html/ops/bbcode_convert_response1.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,15 +42,15 @@
 block discarded – undo
42 42
     $start_id = 0; //Set this to something else if you like
43 43
     $profiles = _mysql_query("select * from profile where userid>$start_id order by userid");
44 44
     echo _mysql_error();
45
-    $i=0;
46
-    while ($profile = _mysql_fetch_object($profiles)){
45
+    $i = 0;
46
+    while ($profile = _mysql_fetch_object($profiles)) {
47 47
         $i++;
48 48
         if ($i%100 == 0) {                      //For every 100 profiles
49
-            echo $profile->userid.". "; flush();   // print out where we are
49
+            echo $profile->userid.". "; flush(); // print out where we are
50 50
             //usleep(200000);
51 51
         }
52 52
 
53
-        if ($profile->userid > $start_id){
53
+        if ($profile->userid > $start_id) {
54 54
             fix_profile($profile);
55 55
         }
56 56
     }
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,14 +43,15 @@
 block discarded – undo
43 43
     $profiles = _mysql_query("select * from profile where userid>$start_id order by userid");
44 44
     echo _mysql_error();
45 45
     $i=0;
46
-    while ($profile = _mysql_fetch_object($profiles)){
46
+    while ($profile = _mysql_fetch_object($profiles)) {
47 47
         $i++;
48
-        if ($i%100 == 0) {                      //For every 100 profiles
48
+        if ($i%100 == 0) {
49
+//For every 100 profiles
49 50
             echo $profile->userid.". "; flush();   // print out where we are
50 51
             //usleep(200000);
51 52
         }
52 53
 
53
-        if ($profile->userid > $start_id){
54
+        if ($profile->userid > $start_id) {
54 55
             fix_profile($profile);
55 56
         }
56 57
     }
Please login to merge, or discard this patch.
html/ops/check_account_ownership_keys.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,15 +23,15 @@
 block discarded – undo
23 23
 admin_page_head("Account Ownership Keys");
24 24
 
25 25
 if (!file_exists($account_ownership_private_key_file_path)) {
26
-  echo "<p>The account ownership private key '" . $account_ownership_private_key_file_name . "' <b>doesn't</b> exist. Please run the 'generate_account_ownership_keys.php' script from the command line in the BOINC web server ops directory.</p>";
26
+    echo "<p>The account ownership private key '" . $account_ownership_private_key_file_name . "' <b>doesn't</b> exist. Please run the 'generate_account_ownership_keys.php' script from the command line in the BOINC web server ops directory.</p>";
27 27
 } else {
28
-  echo "<p>The account ownership private key '" . $account_ownership_private_key_file_name . "' exists.</p>";
28
+    echo "<p>The account ownership private key '" . $account_ownership_private_key_file_name . "' exists.</p>";
29 29
 }
30 30
 
31 31
 if (!file_exists($account_ownership_public_key_file_path)) {
32
-  echo "<p>The account ownership public key '" . $account_ownership_public_key_file_name . "' <b>doesn't</b> exist. Please run the 'generate_account_ownership_keys.php' script from the command line in the BOINC web server ops directory.</p>";
32
+    echo "<p>The account ownership public key '" . $account_ownership_public_key_file_name . "' <b>doesn't</b> exist. Please run the 'generate_account_ownership_keys.php' script from the command line in the BOINC web server ops directory.</p>";
33 33
 } else {
34
-  echo "<p>The account ownership public key '" . $account_ownership_public_key_file_name . "' exists.</p>";
34
+    echo "<p>The account ownership public key '" . $account_ownership_public_key_file_name . "' exists.</p>";
35 35
 }
36 36
 
37 37
 echo "<p>For more info see the related wiki page: <a href=\"https://github.com/BOINC/boinc/wiki/ProofOfOwnership\">ProofOfOwnership</a></p>";
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,15 +23,15 @@
 block discarded – undo
23 23
 admin_page_head("Account Ownership Keys");
24 24
 
25 25
 if (!file_exists($account_ownership_private_key_file_path)) {
26
-  echo "<p>The account ownership private key '" . $account_ownership_private_key_file_name . "' <b>doesn't</b> exist. Please run the 'generate_account_ownership_keys.php' script from the command line in the BOINC web server ops directory.</p>";
26
+  echo "<p>The account ownership private key '".$account_ownership_private_key_file_name."' <b>doesn't</b> exist. Please run the 'generate_account_ownership_keys.php' script from the command line in the BOINC web server ops directory.</p>";
27 27
 } else {
28
-  echo "<p>The account ownership private key '" . $account_ownership_private_key_file_name . "' exists.</p>";
28
+  echo "<p>The account ownership private key '".$account_ownership_private_key_file_name."' exists.</p>";
29 29
 }
30 30
 
31 31
 if (!file_exists($account_ownership_public_key_file_path)) {
32
-  echo "<p>The account ownership public key '" . $account_ownership_public_key_file_name . "' <b>doesn't</b> exist. Please run the 'generate_account_ownership_keys.php' script from the command line in the BOINC web server ops directory.</p>";
32
+  echo "<p>The account ownership public key '".$account_ownership_public_key_file_name."' <b>doesn't</b> exist. Please run the 'generate_account_ownership_keys.php' script from the command line in the BOINC web server ops directory.</p>";
33 33
 } else {
34
-  echo "<p>The account ownership public key '" . $account_ownership_public_key_file_name . "' exists.</p>";
34
+  echo "<p>The account ownership public key '".$account_ownership_public_key_file_name."' exists.</p>";
35 35
 }
36 36
 
37 37
 echo "<p>For more info see the related wiki page: <a href=\"https://github.com/BOINC/boinc/wiki/ProofOfOwnership\">ProofOfOwnership</a></p>";
Please login to merge, or discard this patch.
html/inc/cert.inc 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,10 +43,10 @@  discard block
 block discarded – undo
43 43
     credit_to_ops($credit, $ops, $unit);
44 44
 
45 45
     if ($bolden) {
46
-        $lbold="[[";
47
-        $rbold="]]";
46
+        $lbold = "[[";
47
+        $rbold = "]]";
48 48
     } else {
49
-        $lbold="";        $rbold="";
49
+        $lbold = ""; $rbold = "";
50 50
     }
51 51
     return " $lbold$cobbs Cobblestones$rbold of computation ($ops $unit floating-point operations)";
52 52
 }
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 //
87 87
 function show_share_buttons() {
88 88
     echo '<p>';
89
-    $current_url = (empty($_SERVER['HTTPS']) ? 'http' : 'https') . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
89
+    $current_url = (empty($_SERVER['HTTPS']) ? 'http' : 'https')."://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
90 90
     $cert_url = urlencode($current_url);
91 91
 
92 92
     // Share on Facebook
Please login to merge, or discard this patch.
html/user/cert_team.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,10 +27,10 @@  discard block
 block discarded – undo
27 27
 if (DISABLE_TEAMS) error_page("Teams are disabled");
28 28
 
29 29
 $border = get_str("border", true);
30
-if ($border=="no") {
31
-    $border=0;
30
+if ($border == "no") {
31
+    $border = 0;
32 32
 } else {
33
-    $border=8;
33
+    $border = 8;
34 34
 }
35 35
 
36 36
 // Make sure user_id is in the URL so that share functions work
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 if (!$user_id) {
40 40
     $user = get_logged_in_user();
41 41
     Header(sprintf('Location: %s/cert_team.php?user_id=%d%s',
42
-        url_base(), $user->id, $border==0?'&border=no':''
42
+        url_base(), $user->id, $border == 0 ? '&border=no' : ''
43 43
     ));
44 44
     exit;
45 45
 }
Please login to merge, or discard this patch.
html/user/cert1.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
 require_once("../inc/cert.inc");
25 25
 
26 26
 $border = get_str("border", true);
27
-if ($border=="no") {
28
-    $border=0;
27
+if ($border == "no") {
28
+    $border = 0;
29 29
 } else {
30
-    $border=8;
30
+    $border = 8;
31 31
 }
32 32
 
33 33
 // Make sure user_id is in the URL so that share functions work
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 if (!$user_id) {
37 37
     $user = get_logged_in_user();
38 38
     Header(sprintf('Location: %s/cert1.php?user_id=%d%s',
39
-        url_base(), $user->id, $border==0?'&border=no':''
39
+        url_base(), $user->id, $border == 0 ? '&border=no' : ''
40 40
     ));
41 41
     exit;
42 42
 }
Please login to merge, or discard this patch.
html/user/cert_all.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -25,10 +25,10 @@  discard block
 block discarded – undo
25 25
 require_once("../inc/user.inc");
26 26
 
27 27
 $border = get_str("border", true);
28
-if ($border=="no") {
29
-    $border=0;
28
+if ($border == "no") {
29
+    $border = 0;
30 30
 } else {
31
-    $border=8;
31
+    $border = 8;
32 32
 }
33 33
 
34 34
 // Make sure user_id is in the URL so that share functions work
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 if (!$user_id) {
38 38
     $user = get_logged_in_user();
39 39
     Header(sprintf('Location: %s/cert_all.php?user_id=%d%s',
40
-        url_base(), $user->id, $border==0?'&border=no':''
40
+        url_base(), $user->id, $border == 0 ? '&border=no' : ''
41 41
     ));
42 42
     exit;
43 43
 }
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
     <tr><th align=left>Project</th><th align=left>Cobblestones</th><th align=left>Joined</th></tr>
92 92
 ";
93 93
 foreach ($user->projects as $p) {
94
-    if ($p->total_credit<100) continue;
94
+    if ($p->total_credit < 100) continue;
95 95
     show_proj($p);
96 96
 }
97 97
 echo "
Please login to merge, or discard this patch.