Passed
Push — dpa_submit21 ( e4087a...141260 )
by David
08:42
created
default/boinc/modules/boincuser/boincuser_delete/boincuser_delete.admin.inc 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
   $form['#uid'] = $uid;
66 66
 
67 67
   $form['account']['help'] = array(
68
-    '#value' => "<p>" . t("This form will delete this user <strong>without any email notification</strong> sent to the user. Be very careful in deleting users using this form. Once you select the delete type, check the checkbox, enter your password, and click submit, the user's account will be deleted. This will occur <strong>immediately</strong>. There is no 'undo'!") . "</p><p>" . t("You are deleting the following user, link opens in new window:") . "</p>",
68
+    '#value' => "<p>".t("This form will delete this user <strong>without any email notification</strong> sent to the user. Be very careful in deleting users using this form. Once you select the delete type, check the checkbox, enter your password, and click submit, the user's account will be deleted. This will occur <strong>immediately</strong>. There is no 'undo'!")."</p><p>".t("You are deleting the following user, link opens in new window:")."</p>",
69 69
     '#weight' => -1,
70 70
     '#prefix' => "<div id='delete-instructions'>",
71 71
     '#suffix' => "</div>",
@@ -76,16 +76,16 @@  discard block
 block discarded – undo
76 76
     drupal_set_title($account->boincuser_name);
77 77
 
78 78
     $form['account']['boincuser_name'] = array(
79
-      '#value' => t('<li>BOINC username (public displayname): ') . l("{$account->boincuser_name}", "account/{$account->uid}", array('attributes' => array('target' => '_blank'))),
79
+      '#value' => t('<li>BOINC username (public displayname): ').l("{$account->boincuser_name}", "account/{$account->uid}", array('attributes' => array('target' => '_blank'))),
80 80
     );
81 81
     $form['account']['boincuser_id'] = array(
82
-      '#value' => t('<li>BOINC user ID: ') . $account->boincuser_id,
82
+      '#value' => t('<li>BOINC user ID: ').$account->boincuser_id,
83 83
     );
84 84
     $form['account']['drupal_name'] = array(
85
-      '#value' => t('<li>Drupal username (internal): ') . $account->name,
85
+      '#value' => t('<li>Drupal username (internal): ').$account->name,
86 86
     );
87 87
     $form['account']['user_id'] = array(
88
-      '#value' => t('<li>Drupal user ID: ') . $account->uid,
88
+      '#value' => t('<li>Drupal user ID: ').$account->uid,
89 89
     );
90 90
 
91 91
     $form['account']['user_delete_action'] = array(
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
     form_set_error('user_delete_action', t('Please select an action to perform using the radio buttons.'));
149 149
   }
150 150
 
151
-  if ( ($form_state['values']['user_delete_action'] != 'soft_obfuscate') and ($form_state['values']['user_delete_action'] != 'hard_wipe') ) {
151
+  if (($form_state['values']['user_delete_action'] != 'soft_obfuscate') and ($form_state['values']['user_delete_action'] != 'hard_wipe')) {
152 152
     form_set_error('user_delete_action', t('User Delete action not a predefined value, unknown error in radio buttons.'));
153 153
   }
154 154
 
Please login to merge, or discard this patch.
html/user/create_profile.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 // If $selection is provided, and if it matches one of the entries in the file,
33 33
 // it will be selected by default.
34 34
 //
35
-function show_combo_box($name, $filename, $selection=null) {
35
+function show_combo_box($name, $filename, $selection = null) {
36 36
     echo "<select name=\"$name\" class=\"form-control\">\n";
37 37
 
38 38
     $file = fopen($filename, "r");
@@ -63,14 +63,14 @@  discard block
 block discarded – undo
63 63
 <tr><td colspan=2>
64 64
 <table border=0 cellpadding=5
65 65
 <tr>
66
-<td valign=top><a href=\"" . IMAGE_URL . $profile->userid . '.jpg' . "\"><img src=\"" . IMAGE_URL . $profile->userid . '_sm.jpg' . "\"></a>
66
+<td valign=top><a href=\"" . IMAGE_URL.$profile->userid.'.jpg'."\"><img src=\"".IMAGE_URL.$profile->userid.'_sm.jpg'."\"></a>
67 67
 </td>
68
-<td valign=top>" .tra("%1 Your profile picture is shown to the left.",  $warning) ."
68
+<td valign=top>" .tra("%1 Your profile picture is shown to the left.", $warning)."
69 69
 <p>".
70
-tra("To replace it, click the \"Browse\" button and select a JPEG or PNG file (%1 or less).", "50KB") ."<br />
70
+tra("To replace it, click the \"Browse\" button and select a JPEG or PNG file (%1 or less).", "50KB")."<br />
71 71
 <input name=picture type=file><br>
72 72
 <p>".
73
-tra("To remove it from your profile, check this box:") . "
73
+tra("To remove it from your profile, check this box:")."
74 74
 <input type=checkbox name=delete_pic>
75 75
 <p>
76 76
 </td></tr>";
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         end_table();
79 79
         echo "</td></tr>";
80 80
     } else {
81
-        rowify(tra("If you would like include a picture with your profile, click the \"Browse\" button and select a JPEG or PNG file. Please select images of %1 or less.", "50KB") . "
81
+        rowify(tra("If you would like include a picture with your profile, click the \"Browse\" button and select a JPEG or PNG file. Please select images of %1 or less.", "50KB")."
82 82
 <p>
83 83
 <input name=picture type=file>
84 84
         ");
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     row1(tra("Language"));
94 94
     echo "<tr><td>
95 95
         <p>" .
96
-        tra("Select the language in which your profile is written:") . "
96
+        tra("Select the language in which your profile is written:")."
97 97
         <p>
98 98
     ";
99 99
     if (isset($profile->language)) {
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     if ($recaptcha_public_key) {
111 111
         table_row(boinc_recaptcha_get_html($recaptcha_public_key));
112 112
     }
113
-    table_row("<p><input class=\"btn btn-success\" type=\"submit\" value=\"".tra("Create/edit profile") ."\" name=\"submit\">");
113
+    table_row("<p><input class=\"btn btn-success\" type=\"submit\" value=\"".tra("Create/edit profile")."\" name=\"submit\">");
114 114
 }
115 115
 
116 116
 // Returns an array containing:
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 
125 125
     // Determine if the filetype uploaded is supported.
126 126
     // TODO: Change these to constants.
127
-    switch($size[2]) {
127
+    switch ($size[2]) {
128 128
     case '2':    // JPEG
129 129
         $image = imageCreateFromJPEG($fileName);
130 130
         break;
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 
162 162
 function show_description() {
163 163
     echo "
164
-        <p>" .tra("Your %1 profile %2 lets you share your opinions and background with the %3 community.", "<b>", "</b>", PROJECT) . "
164
+        <p>" .tra("Your %1 profile %2 lets you share your opinions and background with the %3 community.", "<b>", "</b>", PROJECT)."
165 165
         <p>
166 166
     ";
167 167
 }
@@ -179,14 +179,14 @@  discard block
 block discarded – undo
179 179
     row1(show_profile_heading1());
180 180
     rowify(show_profile_question1().bbcode_info());
181 181
     show_textarea("response1", $response1);
182
-    row1( show_profile_heading2());
183
-    rowify( show_profile_question2().bbcode_info());
182
+    row1(show_profile_heading2());
183
+    rowify(show_profile_question2().bbcode_info());
184 184
     show_textarea("response2", $response2);
185 185
     show_language_selection($profile);
186 186
 }
187 187
 
188 188
 function show_textarea($name, $text) {
189
-    rowify("<textarea name=\"$name\" class=\"form-control\" rows=\"10\">" . $text . "</textarea>");
189
+    rowify("<textarea name=\"$name\" class=\"form-control\" rows=\"10\">".$text."</textarea>");
190 190
 }
191 191
 
192 192
 // $profile is null if user doesn't already have a profile.
@@ -232,8 +232,8 @@  discard block
 block discarded – undo
232 232
         $delete_pic = "off";
233 233
     }
234 234
 
235
-    if (strlen($response1)==0 &&
236
-        strlen($response2)==0 &&
235
+    if (strlen($response1) == 0 &&
236
+        strlen($response2) == 0 &&
237 237
         $delete_pic != "on" &&
238 238
         !is_uploaded_file($_FILES['picture']['tmp_name'])
239 239
     ) {
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
         $profile->verification = 0;
248 248
     }
249 249
 
250
-    $profile ? $has_picture = $profile->has_picture: $has_picture = false;
250
+    $profile ? $has_picture = $profile->has_picture : $has_picture = false;
251 251
 
252 252
     if (is_uploaded_file($_FILES['picture']['tmp_name'])) {
253 253
         $has_picture = true;
@@ -262,13 +262,13 @@  discard block
 block discarded – undo
262 262
 
263 263
         // Write the original image file to disk.
264 264
         // TODO: define a constant for image quality.
265
-        ImageJPEG($images[0], IMAGE_PATH . $user->id . '.jpg');
266
-        ImageJPEG($images[1], IMAGE_PATH . $user->id . '_sm.jpg');
265
+        ImageJPEG($images[0], IMAGE_PATH.$user->id.'.jpg');
266
+        ImageJPEG($images[1], IMAGE_PATH.$user->id.'_sm.jpg');
267 267
     }
268 268
     $response1 = sanitize_html($response1);
269 269
     $response2 = sanitize_html($response2);
270 270
 
271
-    $has_picture = $has_picture?1:0;
271
+    $has_picture = $has_picture ? 1 : 0;
272 272
     if ($profile) {
273 273
         $query = " response1 = '".BoincDb::escape_string($response1)."',"
274 274
             ." response2 = '".BoincDb::escape_string($response2)."',"
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
     page_tail();
311 311
 }
312 312
 
313
-function show_profile_form($profile, $warning=null) {
313
+function show_profile_form($profile, $warning = null) {
314 314
     if ($profile) {
315 315
         page_head(tra("Edit your profile"), null, null, null, boinc_recaptcha_get_head_extra());
316 316
     } else {
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincuser/boincuser.admin.inc 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
     '#default_value' => $default['boinc_server_status_url'],
121 121
     '#description' => t('An absolute URL or path relative to the site base to the server status page (e.g. %full_url or just %relative_url).',
122 122
       array(
123
-        '%full_url' => $base_url . '/server_status.php',
123
+        '%full_url' => $base_url.'/server_status.php',
124 124
         '%relative_url' => 'server_status.php',
125 125
       )
126 126
     ),
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
     '#default_value' => $default['boinc_app_list_url'],
132 132
     '#description' => t('An absolute URL or path relative to the site base to the applications page (e.g. %full_url or just %relative_url).',
133 133
       array(
134
-        '%full_url' => $base_url . '/apps.php',
134
+        '%full_url' => $base_url.'/apps.php',
135 135
         '%relative_url' => 'apps.php',
136 136
       )
137 137
     ),
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
     '#type' => 'checkbox',
355 355
     '#title' => t('Enable create_account.php RPC'),
356 356
     '#default_value' => $default['boinc_weboptions_enableaccountcreateRPC'],
357
-    '#description' => t('If checked, users will be able to create an account remotely using the create_account.php RPC. This option is independent of the user regsitration option found in ') . l(t('User management -> User settings'), '/admin/user/settings') . '. If enabled, user <b>may not be able to see and agree to the terms-of-use</b> to your site\'s privacy and data retention policies!',
357
+    '#description' => t('If checked, users will be able to create an account remotely using the create_account.php RPC. This option is independent of the user regsitration option found in ').l(t('User management -> User settings'), '/admin/user/settings').'. If enabled, user <b>may not be able to see and agree to the terms-of-use</b> to your site\'s privacy and data retention policies!',
358 358
   );
359 359
 
360 360
   $form['boinc_weboptions_registrationtitle'] = array(
@@ -409,32 +409,32 @@  discard block
 block discarded – undo
409 409
     '#rows' => 8,
410 410
     '#description' => t('A list of Drupal URLs/paths to ignore for Terms of Use (ToU). If the option above \'Are existing users forced to agree to the Terms of Use?\' is activated, then some paths need to be ignored when checking if a user has agreed to the ToU. A good example is the logout path, "logout", or else users will not be able to logout!
411 411
 <p>There is a default list of paths that must be ignored or else the site will not function. They are not included in this box. Here you may provide additional paths to be ignored, for example the privacy policy page may be accessible so that users may read it before agreeing to the site\'s ToU.
412
-<p>Paths should be entered one per line. All paths should be <em>lower-case</em> and  should not include a leading \'/\'. Example: account/info/edit will allow the user to visit ' . $base_url . '/account/info/edit without first agreeing to the ToU. Regexp are allowed. Example: account/* will allow the user to visit any path starting with ' . $base_url . '/account/.'),
412
+<p>Paths should be entered one per line. All paths should be <em>lower-case</em> and  should not include a leading \'/\'. Example: account/info/edit will allow the user to visit ' . $base_url.'/account/info/edit without first agreeing to the ToU. Regexp are allowed. Example: account/* will allow the user to visit any path starting with '.$base_url.'/account/.'),
413 413
   );
414 414
 
415 415
   $form['pathtitle'] = array(
416 416
     '#value' => '<h3>Path Options</h3>',
417 417
   );
418 418
 
419
-  $form['boinc_weboptions_accountfinish'] = array (
419
+  $form['boinc_weboptions_accountfinish'] = array(
420 420
     '#type' => 'textfield',
421 421
     '#title' => t('Path to a custom account_finish.php page, should be a path to a node'),
422 422
     '#description' => t('Provide a path to a node which will serve as your site\'s landing page for users create an account using the BOINC client manager. They will be directed to this page after the account is created. If blank, a default account_finish page will be used.<br>Examples: account_finish, content/welcome, node/123'),
423 423
     '#default_value' => $default['boinc_weboptions_accountfinish'],
424 424
   );
425
-  $form['boinc_weboptions_moderationpage'] = array (
425
+  $form['boinc_weboptions_moderationpage'] = array(
426 426
     '#type' => 'textfield',
427 427
     '#title' => t('Path to the site\'s content moderation info page, should be a path to a node'),
428 428
     '#description' => t('Provide a path to a node which will serve as your site\'s page for account/content moderation information. This will be used on the default account_finish page. If blank, no link to a moderation page will be provided. If a path is provided to the custom account_finish.php page (above), this field will be ignored.<br>Examples: moderation, content/moderation, node/456'),
429 429
     '#default_value' => $default['boinc_weboptions_moderationpage'],
430 430
   );
431
-  $form['boinc_weboptions_rulespolicies'] = array (
431
+  $form['boinc_weboptions_rulespolicies'] = array(
432 432
     '#type' => 'textfield',
433 433
     '#title' => t('Path to the site\'s rule and policies page, should be a path to a node'),
434 434
     '#description' => t('Provide a path to a node which will serve as your site\'s rules and policies page. This will be used on the Join page shown to new users. If blank, no link to a rules and policies page will be provided.<br>Examples: rules-and-policies, node/789'),
435 435
     '#default_value' => $default['boinc_weboptions_rulespolicies'],
436 436
   );
437
-  $form['boinc_other_frontpage'] = array (
437
+  $form['boinc_other_frontpage'] = array(
438 438
     '#type' => 'textarea',
439 439
     '#title' => bts('Message for site\'s Home Page', array(), NULL, 'boinc:admin-boinc-other-options'),
440 440
     '#default_value' => $default['boinc_other_frontpage'],
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
     '#value' => '<h3>Other Options</h3>',
448 448
   );
449 449
 
450
-  $form['boinc_weboptions_blacklisted_usernames'] = array (
450
+  $form['boinc_weboptions_blacklisted_usernames'] = array(
451 451
     '#type' => 'textarea',
452 452
     '#title' => t('BOINC username blacklist'),
453 453
     '#default_value' => $default['boinc_weboptions_blacklisted_usernames'],
@@ -466,17 +466,17 @@  discard block
 block discarded – undo
466 466
   $values = $form_state['values'];
467 467
 
468 468
   $accountfinish = $values['boinc_weboptions_accountfinish'];
469
-  if ( ($accountfinish) AND (!drupal_lookup_path('source', $accountfinish)) ) {
469
+  if (($accountfinish) AND (!drupal_lookup_path('source', $accountfinish))) {
470 470
     form_set_error('boinc weboptions_accountfinish', t('Path to custom account finish page not found. Please provide a valid path, or leave blank to unset.'));
471 471
   }
472 472
 
473 473
   $moderationpage = $values['boinc_weboptions_moderationpage'];
474
-  if ( ($moderationpage) AND (!drupal_lookup_path('source', $moderationpage)) ) {
474
+  if (($moderationpage) AND (!drupal_lookup_path('source', $moderationpage))) {
475 475
     form_set_error('boinc weboptions_moderationpage', t('Path to moderation page not found. Please provide a valid path, or leave blank to unset.'));
476 476
   }
477 477
 
478 478
   $rulespolicies = $values['boinc_weboptions_rulespolicies'];
479
-  if ( ($rulespolicies) AND (!drupal_lookup_path('source', $rulespolicies)) ) {
479
+  if (($rulespolicies) AND (!drupal_lookup_path('source', $rulespolicies))) {
480 480
     form_set_error('boinc weboptions_rulespolicies', t('Path to rules and policies page not found. Please provide a valid path, or leave blank to unset.'));
481 481
   }
482 482
 }
@@ -485,5 +485,5 @@  discard block
 block discarded – undo
485 485
   * Submit BOINC other form
486 486
   */
487 487
 function boincuser_admin_weboptions_submit($form, &$form_state) {
488
-  drupal_set_message( bts("Status: Drupa-BOINC Web site options have been updated", array(), NULL, 'boinc:admin-boinc-website-options') );
488
+  drupal_set_message(bts("Status: Drupa-BOINC Web site options have been updated", array(), NULL, 'boinc:admin-boinc-website-options'));
489 489
 }
Please login to merge, or discard this patch.
default/boinc/modules/boincuser/boincuser_delete/boincuser_delete.module 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -93,9 +93,9 @@  discard block
 block discarded – undo
93 93
 function boincuser_delete_form_alter(&$form, $form_state, $form_id) {
94 94
   global $user;
95 95
 
96
-  switch($form_id) {
96
+  switch ($form_id) {
97 97
     case 'user_profile_form':
98
-      if ( user_access('delete own account') AND ($form['#uid'] == $user->uid) AND (arg(3)=='') ) {
98
+      if (user_access('delete own account') AND ($form['#uid'] == $user->uid) AND (arg(3) == '')) {
99 99
         $form['delete'] = array(
100 100
           '#type' => 'submit',
101 101
           '#value' => bts('Delete Account', array(), null, 'boinc:delete-user-account'),
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
           '#suffix' => '</li>',
106 106
         );
107 107
       }
108
-      else if ( user_access('administer users') ) {
108
+      else if (user_access('administer users')) {
109 109
         $form['delete'] = array(
110 110
           '#type' => 'submit',
111 111
           '#value' => bts('Delete Account', array(), null, 'boinc:delete-user-account'),
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
           break;
159 159
       }
160 160
 
161
-      $question = 'Are you sure you want to delete the account <em>' . htmlspecialchars($form['_account']['#value']->boincuser_name) . '</em>?';
161
+      $question = 'Are you sure you want to delete the account <em>'.htmlspecialchars($form['_account']['#value']->boincuser_name).'</em>?';
162 162
       drupal_set_title($question);
163 163
 
164 164
       unset($form['description']);
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
       );
178 178
       $form['main']['fs1']['help'] = array(
179 179
         '#value' => bts(
180
-          "<p>In order to delete your account, you must provide your password below. You will then be sent an email to the email address on record, with a one-time token that expires in 24-hours. Clicking on this link will bring you to a second form where you must enter your password again. After doing so your account will be deleted.</p>" .
180
+          "<p>In order to delete your account, you must provide your password below. You will then be sent an email to the email address on record, with a one-time token that expires in 24-hours. Clicking on this link will bring you to a second form where you must enter your password again. After doing so your account will be deleted.</p>".
181 181
           "<p>If necessary, you may !link first before deleting your account. But you must wait <b>seven (7) days</b> after an email address change before you may delete your account.</p>",
182 182
           array(
183 183
             '!link' => l(bts('change your email address', array(), NULL, 'boinc:delete-user-account'), '/account/info/edit'),
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 
190 190
       if ($dtypes == 'user_decides') {
191 191
         $form['main']['common'] = array(
192
-          '#value'  => bts('All choices: ', array(), NULL, 'boinc:delete-user-account') . $common_acts . '<p>' . bts('Disabled means some of your personal data, such as your username and email address, are kept on our systems. Choose \'delete your account\' if you want all personal data to be removed.', array(), NULL, 'boinc:delete-user-account'),
192
+          '#value'  => bts('All choices: ', array(), NULL, 'boinc:delete-user-account').$common_acts.'<p>'.bts('Disabled means some of your personal data, such as your username and email address, are kept on our systems. Choose \'delete your account\' if you want all personal data to be removed.', array(), NULL, 'boinc:delete-user-account'),
193 193
           '#prefix' => "<div id='delete-instructions'>",
194 194
           '#suffix' => "</div>",
195 195
           '#weight' => 20,
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
         '#weight' => 1010,
258 258
       );
259 259
 
260
-      $form['#redirect'] = 'account/' . $uid;
260
+      $form['#redirect'] = 'account/'.$uid;
261 261
       $form['#validate'] = array('boincuser_delete_validate');
262 262
       $form['#submit'] = array('boincuser_delete_submit');
263 263
       break;
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
   global $base_path;
318 318
   module_load_include('inc', 'rules', 'modules/system.rules');
319 319
   $site_name = variable_get('site_name', 'Drupal-BOINC');
320
-  $site_url = $base_url . $base_path . "user/login";
320
+  $site_url = $base_url.$base_path."user/login";
321 321
 
322 322
   // Perform the requested operation
323 323
   $op = $form_state['values']['user_delete_action'];
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
   );
365 365
   rules_action_mail_to_user($account, $settings);
366 366
 
367
-  drupal_set_message(bts("INFO: You have requested account deletion. Please check your email for further instructions.", array(), NULL, 'boinc:delete-user-account'),'info');
367
+  drupal_set_message(bts("INFO: You have requested account deletion. Please check your email for further instructions.", array(), NULL, 'boinc:delete-user-account'), 'info');
368 368
 
369 369
   $redirect = variable_get('boincuser_delete_redirect', '<front>');
370 370
   // Redirect
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
     '#weight' => 1002,
459 459
   );
460 460
   $form['form control tabs'] = array(
461
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "account/") . '</li>',
461
+    '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "account/").'</li>',
462 462
     '#weight' => 1003,
463 463
   );
464 464
   $form['form control tabs suffix'] = array(
@@ -548,7 +548,7 @@  discard block
 block discarded – undo
548 548
     '#weight' => 1002,
549 549
   );
550 550
   $form['form control tabs'] = array(
551
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "account/") . '</li>',
551
+    '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "account/").'</li>',
552 552
     '#weight' => 1003,
553 553
   );
554 554
   $form['form control tabs suffix'] = array(
Please login to merge, or discard this patch.
html/inc/account.inc 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
             tra("Must be at least %1 characters", $min_passwd_length),
101 101
             tra("Password")
102 102
         ),
103
-        "passwd", "", "password",'id="passwd"',passwd_visible_checkbox("passwd")
103
+        "passwd", "", "password", 'id="passwd"', passwd_visible_checkbox("passwd")
104 104
     );
105 105
     if (USER_COUNTRY) {
106 106
         form_select(
@@ -145,9 +145,9 @@  discard block
 block discarded – undo
145 145
     } else {
146 146
         $x = tra("Email address:");
147 147
     }
148
-    form_input_text($x, "email_addr", '', 'text', $attrs='autofocus tabindex="1"');
148
+    form_input_text($x, "email_addr", '', 'text', $attrs = 'autofocus tabindex="1"');
149 149
     form_input_text(
150
-        tra("Password:").'<br><small><a href="get_passwd.php">' . tra("forgot password?") . "</a></small>",
150
+        tra("Password:").'<br><small><a href="get_passwd.php">'.tra("forgot password?")."</a></small>",
151 151
         "passwd",
152 152
         "",
153 153
         "password",
Please login to merge, or discard this patch.
html/user/get_project_config.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,10 +30,10 @@  discard block
 block discarded – undo
30 30
 //
31 31
 function show_platforms() {
32 32
     $xmlFragment = unserialize(get_cached_data(3600, "project_config_platform_xml"));
33
-    if ($xmlFragment==false){
33
+    if ($xmlFragment == false) {
34 34
         $platforms = BoincDB::get()->enum_fields("platform, DBNAME.app_version, DBNAME.app", "BoincPlatform", "platform.name, platform.user_friendly_name, plan_class", "app_version.platformid = platform.id and app_version.appid = app.id and app_version.deprecated=0 and app.deprecated=0 group by platform.name, plan_class", "");
35 35
         $xmlFragment = "    <platforms>";
36
-        foreach ($platforms as $platform){
36
+        foreach ($platforms as $platform) {
37 37
             $xmlFragment .= "
38 38
             <platform>
39 39
                 <platform_name>$platform->name</platform_name>
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 if (defined('TERMSOFUSE_FILE')) {
116 116
   $tou_file = TERMSOFUSE_FILE;
117 117
 } else {
118
-  $tou_file =  "../../terms_of_use.txt";
118
+  $tou_file = "../../terms_of_use.txt";
119 119
 }
120 120
 if (file_exists($tou_file)) {
121 121
     $terms_of_use = trim(file_get_contents($tou_file));
Please login to merge, or discard this patch.
html/ops/mass_email_script.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 $globals->batch = 1000;
56 56
 $globals->lapsed_interval = 60*86400;
57 57
 
58
-for ($i=1; $i<$argc; $i++) {
58
+for ($i = 1; $i < $argc; $i++) {
59 59
     if ($argv[$i] == "--batch") {
60 60
         $i++;
61 61
         $globals->batch = $argv[$i];
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
         gmdate('d F Y', $user->create_time),
170 170
         number_format($user->total_credit, 0),
171 171
         opt_out_url($user),
172
-        floor((time() - $user->last_rpc_time) / 86400),
172
+        floor((time() - $user->last_rpc_time)/86400),
173 173
     );
174 174
     return preg_replace($pat, $rep, $template);
175 175
 }
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
     while ($user = _mysql_fetch_object($result)) {
239 239
         handle_user($user);
240 240
         $startid = $user->id;
241
-        fputs($log, $user->id . "\n");
241
+        fputs($log, $user->id."\n");
242 242
         fflush($log);
243 243
     }
244 244
     _mysql_free_result($result);
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
     $user = _mysql_fetch_object($result);
253 253
     if ($user) {
254 254
         handle_user($user);
255
-        fputs($log, $user->id . "\n");
255
+        fputs($log, $user->id."\n");
256 256
         fflush($log);
257 257
     }
258 258
     _mysql_free_result($result);
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
     } else {
290 290
         $fid = fopen($id_file, 'r');
291 291
         if (!$fid) {
292
-            echo  $id_file . ' not found - create ID list and run again\n';
292
+            echo  $id_file.' not found - create ID list and run again\n';
293 293
             exit();
294 294
         }
295 295
         $thisid = 0;
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
         }
301 301
         fclose($fid);
302 302
     }
303
-    echo 'All done!' . "\n";
303
+    echo 'All done!'."\n";
304 304
 }
305 305
 
306 306
 if (!function_exists('make_php_mailer')) {
Please login to merge, or discard this patch.
drupal/sites/default/settings.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
  */
115 115
 require_once('dbconfig.php');
116 116
 if (!isset($dbserver) || empty($dbserver))
117
-  $dbserver='localhost';
117
+  $dbserver = 'localhost';
118 118
 $db_url = array(
119 119
   'default' => "{$dbtype}://{$dbuser}:".urlencode($dbpass)."@{$dbserver}/{$dbname}",
120 120
   'boinc_rw' => "{$boinc_rw_dbtype}://{$boinc_rw_dbuser}:".urlencode($boinc_rw_dbpass)."@{$boinc_rw_dbserver}/{$boinc_rw_dbname}"
@@ -162,14 +162,14 @@  discard block
 block discarded – undo
162 162
  * settings are used there. Settings defined here should not be
163 163
  * duplicated there so as to avoid conflict issues.
164 164
  */
165
-ini_set('session.cache_expire',     200000);
166
-ini_set('session.cache_limiter',    'none');
167
-ini_set('session.cookie_lifetime',  2000000);
168
-ini_set('session.gc_maxlifetime',   200000);
169
-ini_set('session.save_handler',     'user');
165
+ini_set('session.cache_expire', 200000);
166
+ini_set('session.cache_limiter', 'none');
167
+ini_set('session.cookie_lifetime', 2000000);
168
+ini_set('session.gc_maxlifetime', 200000);
169
+ini_set('session.save_handler', 'user');
170 170
 ini_set('session.use_only_cookies', 1);
171
-ini_set('session.use_trans_sid',    0);
172
-ini_set('url_rewriter.tags',        '');
171
+ini_set('session.use_trans_sid', 0);
172
+ini_set('url_rewriter.tags', '');
173 173
 ini_set('memory_limit', '128M');
174 174
 ini_set('post_max_size', '8MB');
175 175
 ini_set('upload_max_filesize', '8MB');
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincteam/includes/boincteam.helpers.inc 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -87,15 +87,15 @@  discard block
 block discarded – undo
87 87
       'teaser' => $teaser,
88 88
       'uid' => boincuser_lookup_uid($boincteam->userid),
89 89
       'path' => null,
90
-      'status' => 1,  // published or not - always publish
90
+      'status' => 1, // published or not - always publish
91 91
       'promote' => 0,
92 92
       'created' => $boincteam->create_time,
93
-      'comment' => 0,  // comments disabled
93
+      'comment' => 0, // comments disabled
94 94
       'moderate' => 0,
95 95
       'sticky' => 0,
96 96
       'format' => $input_format
97 97
     );
98
-    $node = (object) $node; // node_save requires an object form
98
+    $node = (object)$node; // node_save requires an object form
99 99
   }
100 100
   
101 101
   $node->taxonomy[] = taxonomy_get_term($team_type_tid);
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
  *   flag send_email=1, meaning their notification privacy will be
126 126
  *   respected. This is useful the list of users are to be contacted.
127 127
  */
128
-function _boincteam_userids($boincteamid, $boincid=TRUE, $respectprivacy=TRUE) {
128
+function _boincteam_userids($boincteamid, $boincid = TRUE, $respectprivacy = TRUE) {
129 129
   $sql = 'SELECT user.id as id FROM {user} user WHERE user.teamid=%s';
130 130
   if ($respectprivacy) {
131 131
     $sql .= ' AND user.send_email=1';
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
  *   flag send_email=1, meaning their notification privacy will be
158 158
  *   respected. This is useful the list of users are to be contacted.
159 159
  */
160
-function _boincteam_emails($boincteamid, $respectprivacy=TRUE) {
160
+function _boincteam_emails($boincteamid, $respectprivacy = TRUE) {
161 161
   $sql = 'SELECT user.email_addr as email_addr FROM {user} user WHERE user.teamid=%s';
162 162
   if ($respectprivacy) {
163 163
     $sql .= ' AND user.send_email=1';
Please login to merge, or discard this patch.