Passed
Push — vko_msi_refactor ( 225587 )
by Vitalii
11:56
created
html/user/show_user.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,12 +39,12 @@  discard block
 block discarded – undo
39 39
 }
40 40
 $format = get_str("format", true);
41 41
 
42
-if ($format=="xml"){
42
+if ($format=="xml") {
43 43
     // don't do caching for XML
44 44
     xml_header();
45 45
     $retval = db_init_xml();
46 46
     if ($retval) xml_error($retval);
47
-    if ($auth){
47
+    if ($auth) {
48 48
         $user = BoincUser::lookup_auth($auth);
49 49
         $show_hosts = true;
50 50
     } else {
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     //
61 61
     $cache_args="userid=".$id;
62 62
     $cached_data = get_cached_data(USER_PAGE_TTL, $cache_args);
63
-    if ($cached_data){
63
+    if ($cached_data) {
64 64
         // We found some old but non-stale data, let's use it
65 65
         $data = unserialize($cached_data);
66 66
         $user = $data->user;
Please login to merge, or discard this patch.
html/ops/manage_user.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
 
40 40
 // Delete a user if they have no credit, results, or posts
41 41
 //
42
-function possibly_delete_user($user){
43
-    if ($user->total_credit > 0.0){
42
+function possibly_delete_user($user) {
43
+    if ($user->total_credit > 0.0) {
44 44
         admin_error_page("Cannot delete user: User has credit.");
45 45
     }
46 46
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         admin_error_page("Cannot delete user: User has forum posts.");
57 57
     }
58 58
 
59
-    if ($user->teamid){
59
+    if ($user->teamid) {
60 60
         user_quit_team($user);
61 61
     }
62 62
     delete_user($user);
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
             // put a timestamp in wiki to trigger re-validation of credentials
102 102
 
103
-            if (function_exists('touch_wiki_user')){
103
+            if (function_exists('touch_wiki_user')) {
104 104
                 touch_wiki_user($user);
105 105
             }
106 106
 
Please login to merge, or discard this patch.
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.