Passed
Pull Request — master (#5767)
by Vitalii
11:20
created
html/user/forum_index.php 3 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
         if ($first) {
80 80
             $first = false;
81 81
             echo "<p>";
82
-            echo forum_title($category, NULL, NULL);
82
+            echo forum_title($category, null, null);
83 83
             echo "<p>";
84 84
             show_mark_as_read_button($user);
85 85
             start_table('table-striped');
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         project_forum_index_intro();
70 70
     }
71 71
 
72
-    if (defined('FORUM_QA_MERGED_MODE') && FORUM_QA_MERGED_MODE){
72
+    if (defined('FORUM_QA_MERGED_MODE') && FORUM_QA_MERGED_MODE) {
73 73
         $categories = BoincCategory::enum("true order by orderID");
74 74
     } else {
75 75
         echo "<p>"
@@ -210,5 +210,5 @@  discard block
 block discarded – undo
210 210
 } else {
211 211
     main($user);
212 212
 }
213
-$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
213
+$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit
214 214
 ?>
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
         project_forum_index_intro();
70 70
     }
71 71
 
72
-    if (defined('FORUM_QA_MERGED_MODE') && FORUM_QA_MERGED_MODE){
72
+    if (defined('FORUM_QA_MERGED_MODE') && FORUM_QA_MERGED_MODE) {
73 73
         $categories = BoincCategory::enum("true order by orderID");
74 74
     } else {
75 75
         echo "<p>"
Please login to merge, or discard this patch.
html/user/user_permissions.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     start_table('table-striped');
28 28
 
29 29
     $x = ['User'];
30
-    for ($i=0; $i<S_NFLAGS; $i++) {
30
+    for ($i = 0; $i < S_NFLAGS; $i++) {
31 31
         $x[] = $special_user_bitfield[$i];
32 32
     }
33 33
     $x[] = '';
@@ -42,9 +42,9 @@  discard block
 block discarded – undo
42 42
             $pref->userid
43 43
         );
44 44
         $x = ["$user->name ($user->id)"];
45
-        for ($j=0; $j<S_NFLAGS; $j++) {
45
+        for ($j = 0; $j < S_NFLAGS; $j++) {
46 46
             $bit = substr($pref->special_user, $j, 1);
47
-            $c = ($bit == 1)?"checked":"";
47
+            $c = ($bit == 1) ? "checked" : "";
48 48
             $x[] = sprintf(
49 49
                 '<input type="checkbox" name="role%d" value="1" %s>',
50 50
                 $j, $c
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
     echo '<form action="user_permissions.php" method="POST">';
59 59
     $x = ['Add User ID: <input type="text" name="userid" size="6">'];
60
-    for ($j=0; $j<S_NFLAGS; $j++) {
60
+    for ($j = 0; $j < S_NFLAGS; $j++) {
61 61
         $x[] = sprintf(
62 62
             '<input type="checkbox" name="role%d" value="1">',
63 63
             $j
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     if (!$user) error_page('no user');
78 78
     BoincForumPrefs::lookup($user);
79 79
 
80
-    for ($i=0; $i<S_NFLAGS; $i++) {
80
+    for ($i = 0; $i < S_NFLAGS; $i++) {
81 81
         if (post_int("role$i", true) == 1) {
82 82
             $bitset .= '1';
83 83
             echo "<br> setting $i";
@@ -103,5 +103,5 @@  discard block
 block discarded – undo
103 103
     user_permissions_form();
104 104
 }
105 105
 
106
-$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
106
+$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit
107 107
 ?>
Please login to merge, or discard this patch.
html/ops/botnet.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 //      add other criteria like # of countries (based on IP addr)
8 8
 //      consider only hosts with recent last RPC time
9 9
 
10
-define ('MAX_HOSTS', 100);
10
+define('MAX_HOSTS', 100);
11 11
 
12 12
 require_once('../inc/boinc_db.inc');
13 13
 
Please login to merge, or discard this patch.
html/user/forum_reply.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     $parent_post_id = 0;
57 57
 }
58 58
 
59
-if ($filter != "false"){
59
+if ($filter != "false") {
60 60
     $filter = true;
61 61
 } else {
62 62
     $filter = false;
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 }
72 72
 
73 73
 $warning = null;
74
-if ($content && (!$preview)){
74
+if ($content && (!$preview)) {
75 75
     check_tokens($logged_in_user->authenticator);
76 76
     if (!akismet_check($logged_in_user, $content)) {
77 77
         $warning = tra("Your post has been flagged as spam by the Akismet anti-spam system. Please modify your text and try again.");
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     }
94 94
 }
95 95
 
96
-page_head(tra("Post to thread")." '$thread->title'",'','','', $bbcode_js);
96
+page_head(tra("Post to thread")." '$thread->title'", '', '', '', $bbcode_js);
97 97
 
98 98
 if ($parent_post) {
99 99
     echo sprintf(
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
     $x2 .= " method=\"post\" name=\"post\" onsubmit=\"return checkForm(this)\">\n";
162 162
     $x2 .= form_tokens($logged_in_user->authenticator);
163 163
     $x2 .= $bbcode_html."<textarea class=\"form-control\" name=\"content\" rows=\"18\">";
164
-    $no_quote = get_int("no_quote", true)==1;
164
+    $no_quote = get_int("no_quote", true) == 1;
165 165
     if ($preview) {
166 166
         $x2 .= htmlspecialchars($content);
167 167
     } else if (!$no_quote) {
@@ -170,9 +170,9 @@  discard block
 block discarded – undo
170 170
         }
171 171
     }
172 172
     if (!$logged_in_user->prefs->no_signature_by_default) {
173
-        $enable_signature='checked="true"';
173
+        $enable_signature = 'checked="true"';
174 174
     } else {
175
-        $enable_signature="";
175
+        $enable_signature = "";
176 176
     }
177 177
     $x2 .= sprintf('</textarea><p> </p>
178 178
         <input class="btn btn-sm" %s type="submit" name="preview" value="%s">
@@ -200,11 +200,11 @@  discard block
 block discarded – undo
200 200
     return sprintf(
201 201
         'In reply to %s\'s message of %s:
202 202
         [quote]%s[/quote]',
203
-        $user?$user->name:'unknown user',
203
+        $user ? $user->name : 'unknown user',
204 204
         date_str($post->timestamp),
205 205
         htmlspecialchars($post->content)
206 206
     );
207 207
 }
208 208
 
209
-$cvs_version_tracker[]="\$Id$";
209
+$cvs_version_tracker[] = "\$Id$";
210 210
 ?>
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     $parent_post_id = 0;
57 57
 }
58 58
 
59
-if ($filter != "false"){
59
+if ($filter != "false") {
60 60
     $filter = true;
61 61
 } else {
62 62
     $filter = false;
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 }
72 72
 
73 73
 $warning = null;
74
-if ($content && (!$preview)){
74
+if ($content && (!$preview)) {
75 75
     check_tokens($logged_in_user->authenticator);
76 76
     if (!akismet_check($logged_in_user, $content)) {
77 77
         $warning = tra("Your post has been flagged as spam by the Akismet anti-spam system. Please modify your text and try again.");
Please login to merge, or discard this patch.
html/user/forum_post.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -56,10 +56,10 @@  discard block
 block discarded – undo
56 56
 $preview = post_str("preview", true);
57 57
 $warning = null;
58 58
 
59
-if ($content && $title && (!$preview)){
59
+if ($content && $title && (!$preview)) {
60 60
     if (post_str('add_signature', true)) {
61
-        $add_signature = true;    // set a flag and concatenate later
62
-    }  else {
61
+        $add_signature = true; // set a flag and concatenate later
62
+    } else {
63 63
         $add_signature = false;
64 64
     }
65 65
     check_tokens($logged_in_user->authenticator);
@@ -74,14 +74,14 @@  discard block
 block discarded – undo
74 74
             if (post_str('subscribe', true)) {
75 75
                 BoincSubscription::replace($logged_in_user->id, $thread->id);
76 76
             }
77
-            header('Location: forum_thread.php?id=' . $thread->id);
77
+            header('Location: forum_thread.php?id='.$thread->id);
78 78
         } else {
79 79
             error_page("Can't create thread.  $forum_error");
80 80
         }
81 81
     }
82 82
 }
83 83
 
84
-page_head(tra("Create new thread"),'','','', $bbcode_js);
84
+page_head(tra("Create new thread"), '', '', '', $bbcode_js);
85 85
 show_forum_header($logged_in_user);
86 86
 
87 87
 if ($warning) {
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
     $submit_help = "<br /><font color=\"red\">".tra("Remember to add a title")."</font>";
123 123
 }
124 124
 
125
-if ($force_title && $title){
125
+if ($force_title && $title) {
126 126
     row2(
127 127
         tra("Title"),
128 128
         sprintf(
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
     row2(
137 137
         tra("Title").$submit_help,
138 138
         sprintf('<input type="text" class="form-control" name="title" value="%s">',
139
-            $title?htmlspecialchars($title):''
139
+            $title ?htmlspecialchars($title) : ''
140 140
         ),
141 141
         null, FORUM_LH_PCT
142 142
     );
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
     sprintf(
148 148
         '%s <textarea class="form-control" name="content" rows="12" cols="80">%s</textarea>',
149 149
         $bbcode_html,
150
-        $content?htmlspecialchars($content):''
150
+        $content ?htmlspecialchars($content) : ''
151 151
     ),
152 152
     null, FORUM_LH_PCT
153 153
 );
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 if (!$logged_in_user->prefs->no_signature_by_default) {
156 156
     $enable_signature = 'checked="true"';
157 157
 } else {
158
-    $enable_signature='';
158
+    $enable_signature = '';
159 159
 }
160 160
 
161 161
 if (is_news_forum($forum)) {
@@ -195,5 +195,5 @@  discard block
 block discarded – undo
195 195
 
196 196
 page_tail();
197 197
 
198
-$cvs_version_tracker[]="\$Id$";
198
+$cvs_version_tracker[] = "\$Id$";
199 199
 ?>
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -56,10 +56,10 @@  discard block
 block discarded – undo
56 56
 $preview = post_str("preview", true);
57 57
 $warning = null;
58 58
 
59
-if ($content && $title && (!$preview)){
59
+if ($content && $title && (!$preview)) {
60 60
     if (post_str('add_signature', true)) {
61 61
         $add_signature = true;    // set a flag and concatenate later
62
-    }  else {
62
+    } else {
63 63
         $add_signature = false;
64 64
     }
65 65
     check_tokens($logged_in_user->authenticator);
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
     $submit_help = "<br /><font color=\"red\">".tra("Remember to add a title")."</font>";
123 123
 }
124 124
 
125
-if ($force_title && $title){
125
+if ($force_title && $title) {
126 126
     row2(
127 127
         tra("Title"),
128 128
         sprintf(
Please login to merge, or discard this patch.