Passed
Push — vko_fix_build ( f1c349...f93f07 )
by Vitalii
25:51 queued 10:00
created
html/ops/bbcode_convert_signature.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,14 +43,15 @@
 block discarded – undo
43 43
     $forum_preferencess = _mysql_query("select * from forum_preferences where userid>$start_id order by userid");
44 44
     echo _mysql_error();
45 45
     $i=0;
46
-    while ($forum_preferences = _mysql_fetch_object($forum_preferencess)){
46
+    while ($forum_preferences = _mysql_fetch_object($forum_preferencess)) {
47 47
         $i++;
48
-        if ($i%100 == 0) {                      //For every 100 forum_preferencess
48
+        if ($i%100 == 0) {
49
+//For every 100 forum_preferencess
49 50
             echo $forum_preferences->userid.". "; flush();   // print out where we are
50 51
             //usleep(200000);
51 52
         }
52 53
 
53
-        if ($forum_preferences->userid > $start_id){
54
+        if ($forum_preferences->userid > $start_id) {
54 55
             fix_forum_preferences($forum_preferences);
55 56
         }
56 57
     }
Please login to merge, or discard this patch.
html/ops/bbcode_convert.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,14 +45,15 @@
 block discarded – undo
45 45
     $posts = _mysql_query("select * from post where id>$start_id order by id");
46 46
     echo _mysql_error();
47 47
     $i=0;
48
-    while ($post = _mysql_fetch_object($posts)){
48
+    while ($post = _mysql_fetch_object($posts)) {
49 49
         $i++;
50
-        if ($i%100 == 0) {                      //For every 100 posts
50
+        if ($i%100 == 0) {
51
+//For every 100 posts
51 52
             echo $post->id.". "; flush();   // print out where we are
52 53
             //usleep(200000);
53 54
         }
54 55
 
55
-        if ($post->id > $start_id){
56
+        if ($post->id > $start_id) {
56 57
             fix_post($post);
57 58
         }
58 59
     }
Please login to merge, or discard this patch.
html/ops/list_new_users.php 1 patch
Braces   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     $email_validated = $row->email_validated;
68 68
 
69 69
     $team_name="";
70
-    if($row->teamid > 0){
70
+    if($row->teamid > 0) {
71 71
         $team = BoincTeam::lookup_id($row->teamid);
72 72
         $team_name = $team->name;
73 73
     }
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     if ($special_bits != "0") {
81 81
         for ($i = 0; $i < 7; $i++) {
82 82
             $bit = substr($special_bits, $i, 1);
83
-            if ($bit == '1'){
83
+            if ($bit == '1') {
84 84
                 if (!empty($roles)) {
85 85
                     $roles .= ", ";
86 86
                 }
@@ -97,8 +97,7 @@  discard block
 block discarded – undo
97 97
         $dt = $user->banished_until - time();
98 98
         if( $dt > 0 ) {
99 99
             $x = "<span style=\"color: #ff0000\">Currently banished</span>";
100
-        }
101
-        else {
100
+        } else {
102 101
             $x = "<span style=\"color: #ff9900\">Previously banished</span>";
103 102
         }
104 103
         $roles .= $x;
Please login to merge, or discard this patch.
html/ops/manage_special_users.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
     FROM forum_preferences as prefs, user
38 38
     WHERE CONVERT(special_user, DECIMAL) > 0 and prefs.userid=user.id"
39 39
 );
40
-for ($i=1; $i<=_mysql_num_rows($result); $i++){
40
+for ($i=1; $i<=_mysql_num_rows($result); $i++) {
41 41
 	$foo = _mysql_fetch_object($result);
42 42
     echo "<form action=\"manage_special_users_action.php\" method=\"POST\">\n";
43 43
     echo "<input type=\"hidden\" name=\"userid\" value=\"$foo->userid\"
Please login to merge, or discard this patch.
html/ops/db_form.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
 
35 35
 start_table();
36 36
 
37
-switch($table){
37
+switch($table) {
38 38
 	case "platform":
39 39
 		break;
40 40
 	case "app":
Please login to merge, or discard this patch.
html/ops/db_update.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
     do_query("alter table host add max_results_day integer not null");
277 277
 }
278 278
 
279
-function update_4_20_2005(){
279
+function update_4_20_2005() {
280 280
     do_query("ALTER TABLE `thread` ADD `sticky` TINYINT UNSIGNED DEFAULT '0' NOT NULL");
281 281
     do_query("ALTER TABLE `forum` ADD `post_min_total_credit` INT NOT NULL AFTER `posts`");
282 282
     do_query("ALTER TABLE `forum` ADD `post_min_expavg_credit` INT NOT NULL AFTER `posts`");
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
     do_query("ALTER TABLE `forum_preferences` ADD `last_post` INT( 14 ) UNSIGNED NOT NULL AFTER `posts`");
287 287
 }
288 288
 
289
-function update_4_30_2005(){
289
+function update_4_30_2005() {
290 290
     do_query("ALTER TABLE `forum_preferences` ADD `ignore_sticky_posts` TINYINT( 1 ) UNSIGNED NOT NULL");
291 291
 }
292 292
 
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
     do_query("update user set country='Macedonia' where country='Macedonia, The Former Yugoslav Republic of'");
314 314
 }
315 315
 
316
-function update_11_24_2005(){
316
+function update_11_24_2005() {
317 317
     do_query("ALTER TABLE `forum_preferences` ADD `minimum_wrap_postcount` INT DEFAULT '100' NOT NULL AFTER `high_rating_threshold` ,
318 318
 ADD `display_wrap_postcount` INT DEFAULT '75' NOT NULL AFTER `minimum_wrap_postcount`");
319 319
 }
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
     ");
619 619
 }
620 620
 
621
-function update_10_05_2008(){
621
+function update_10_05_2008() {
622 622
     do_query("alter table forum_preferences add highlight_special tinyint default '1' not null");
623 623
 }
624 624
 
Please login to merge, or discard this patch.
html/ops/bbcode_convert_response2.php 1 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.
drupal/sites/default/boinc/modules/boincuser/includes/boincuser.forms.inc 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -345,8 +345,7 @@  discard block
 block discarded – undo
345 345
   if (!$account) {
346 346
     global $user;
347 347
     $account = user_load($user->id);
348
-  }
349
-  elseif (is_numeric($account)) {
348
+  } elseif (is_numeric($account)) {
350 349
     $account = user_load($account);
351 350
   }
352 351
 
@@ -422,13 +421,11 @@  discard block
 block discarded – undo
422 421
     // (except in cases where password is being reset)
423 422
     if (isset($_SESSION['reset_pass'])) {
424 423
       unset($_SESSION['reset_pass']);
425
-    }
426
-    else {
424
+    } else {
427 425
       $given_hash = md5($edit['current_pass'] . strtolower($account->mail));
428 426
       if (!$edit['current_pass']) {
429 427
         form_set_error('current_pass', bts('Authentication is required when changing E-mail address or setting new password.', array(), NULL, 'boinc:account-credentials-change'));
430
-      }
431
-      elseif ( (!password_verify($given_hash, $boinc_user->passwd_hash)) and ($given_hash != $boinc_user->passwd_hash) ) {
428
+      } elseif ( (!password_verify($given_hash, $boinc_user->passwd_hash)) and ($given_hash != $boinc_user->passwd_hash) ) {
432 429
         form_set_error('current_pass', bts('Password entered is not valid. Please verify that it is correct.', array(), NULL, 'boinc:account-credentials-change'));
433 430
       }
434 431
 
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincuser/includes/boincuser.helpers.inc 1 patch
Braces   +11 added lines, -22 removed lines patch added patch discarded remove patch
@@ -71,8 +71,7 @@  discard block
 block discarded – undo
71 71
       unset($account->roles[$unrestricted_role]);
72 72
     }
73 73
     user_save($account, array('roles' => $account->roles));
74
-  }
75
-  else {
74
+  } else {
76 75
     if (!isset($account->roles[$community_role])) {
77 76
       // The user should be a 'community member' role. If the user was
78 77
       // previously banned, this will restore that role.
@@ -88,8 +87,7 @@  discard block
 block discarded – undo
88 87
         $account->roles[$unrestricted_role] = 'verified contributor';
89 88
         user_save($account, array('roles' => $account->roles));
90 89
       }
91
-    }
92
-    else {
90
+    } else {
93 91
       drupal_set_message(bts(
94 92
         'You must earn @count more credits to be able to post comments on this site and create or modify your user profile.',
95 93
         array('@count' => $min_credit_to_post - $account->boincuser_total_credit)
@@ -175,12 +173,10 @@  discard block
 block discarded – undo
175 173
       if ($never_been_picked) {
176 174
         // Allow users who have been previously selected
177 175
         $never_been_picked = FALSE;
178
-      }
179
-      elseif ($active_users) {
176
+      } elseif ($active_users) {
180 177
         // Allow users who are not even active (getting desperate)
181 178
         $active_users = FALSE;
182
-      }
183
-      else {
179
+      } else {
184 180
         // Process failed...
185 181
         return FALSE;
186 182
       }
@@ -235,8 +231,7 @@  discard block
 block discarded – undo
235 231
     $graf1 = "Your email address was changed from {$prev_email} to {$new_email} "
236 232
       . "on {$changedate}. If you need to reverse this change, please look for "
237 233
       . "an email send to the email address: {$prev_email}.\n";
238
-  }
239
-  else {
234
+  } else {
240 235
     $graf1 = "Your email address was changed from {$prev_email} to {$new_email} "
241 236
       . "on {$changedate}. You will not be able to change your email address "
242 237
       . "until {$newdate}. If you need to reverse this change, please look for "
@@ -357,8 +352,7 @@  discard block
 block discarded – undo
357 352
       rules_invoke_event('boincuser_general_consent_error', variable_get('boinc_admin_mailing_list_subject_tag', ''));
358 353
     }
359 354
     return $rc1;
360
-  }
361
-  else {
355
+  } else {
362 356
     drupal_set_message(
363 357
       bts('ERROR: Consent type for enrollment not found. The @project administrators have been nofitifed.',
364 358
         array('@project' => variable_get('site_name', 'Drupal-BOINC')), NULL, 'boinc:consent-termsofuse'),
@@ -399,8 +393,7 @@  discard block
 block discarded – undo
399 393
   // If boincid or token is not present, then go to the home page.
400 394
   if (empty($params['boincid']) or empty($params['token'])) {
401 395
     $redirect = '';
402
-  }
403
-  else {
396
+  } else {
404 397
     $uid = boincuser_lookup_uid($params['boincid']);
405 398
     $redirect = "/user/${uid}/recoveremail/${params['token']}";
406 399
   }
@@ -451,8 +444,7 @@  discard block
 block discarded – undo
451 444
   $dir = "boinc_{$type}_dir";
452 445
   if ($include_dir = variable_get("boinc_{$type}_dir", '')) {
453 446
     return $include_dir;
454
-  }
455
-  else {
447
+  } else {
456 448
     // Don't show errors on blacklisted pages
457 449
     $page_blacklist = array(
458 450
       'admin/boinc/environment'
@@ -465,8 +457,7 @@  discard block
 block discarded – undo
465 457
         drupal_set_message(t('The BOINC environment is not configured. Please
466 458
           !configure_it', array('!configure_it' => l(t('configure it now'),
467 459
             'admin/boinc/environment'))), 'warning', FALSE);
468
-      }
469
-      else {
460
+      } else {
470 461
         drupal_set_message(t('There is a problem with the site. Please contact
471 462
           the system administrator.'), 'error', FALSE);
472 463
       }
@@ -481,8 +472,7 @@  discard block
 block discarded – undo
481 472
       if (!in_array($_GET['q'], $redirect_blacklist)) {
482 473
         drupal_goto('');
483 474
       }
484
-    }
485
-    else {
475
+    } else {
486 476
       // Clear the messages on the environment config page
487 477
       drupal_get_messages();
488 478
     }
@@ -501,8 +491,7 @@  discard block
 block discarded – undo
501 491
   );
502 492
   if ($url_config = variable_get('boinc_scheduler_urls', '')) {
503 493
     return explode("\r\n", $url_config);
504
-  }
505
-  elseif (!in_array($_GET['q'], $page_blacklist)) {
494
+  } elseif (!in_array($_GET['q'], $page_blacklist)) {
506 495
     watchdog('boincuser', 'The BOINC scheduling server settings are not yet
507 496
         configured. Please !verify for the settings to become effective.',
508 497
           array('!verify' => l(t('verify the default values') . ' <strong>' .
Please login to merge, or discard this patch.