Passed
Push — master ( 5d1d4c...0827ba )
by Vitalii
01:16 queued 22s
created
html/inc/sandbox.inc 1 patch
Braces   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     foreach ($files as $file) {
62 62
         $path = "$dir/$file";
63 63
         [$err, $file_size, $file_md5] = sandbox_parse_link_file($path);
64
-        if (!$err){
64
+        if (!$err) {
65 65
             if (strcmp($md5, $file_md5) == 0) {
66 66
                 $exist = true;
67 67
                 $elf = $file;
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 // TODO: this is a kludge.
155 155
 // Should we use the job_file and batch_file_assoc tables instead?
156 156
 //
157
-function sandbox_file_in_use($user, $file){
157
+function sandbox_file_in_use($user, $file) {
158 158
     $ufiles = array();
159 159
 
160 160
     $pbatches = BoincBatch::enum(
@@ -164,16 +164,16 @@  discard block
 block discarded – undo
164 164
     );
165 165
     if (!$pbatches) return false;
166 166
 
167
-    foreach ($pbatches as $batch){
167
+    foreach ($pbatches as $batch) {
168 168
         $wus = BoincWorkUnit::enum("batch = $batch->id limit 1" );
169
-        if ($wus == null){
169
+        if ($wus == null) {
170 170
             continue;
171 171
         }
172
-        foreach($wus as $wu){
172
+        foreach($wus as $wu) {
173 173
             $x = "<in>".$wu->xml_doc."</in>";
174 174
             $x = simplexml_load_string($x);
175 175
             global $fanout;
176
-            foreach($x->workunit->file_ref as $fr){
176
+            foreach($x->workunit->file_ref as $fr) {
177 177
                 $pname = (string)$fr->file_name;
178 178
                 $ufiles[] = $pname;
179 179
             }
@@ -182,10 +182,10 @@  discard block
 block discarded – undo
182 182
     $dir = sandbox_dir($user);
183 183
     $path = $dir."/".$file;
184 184
     list($err, $size, $md5) = sandbox_parse_link_file($path);
185
-    if (!$err){
185
+    if (!$err) {
186 186
         $f = sandbox_file_name($user, $md5);
187 187
         foreach($ufiles as $uf) {
188
-            if (strcmp($f,$uf) == 0){
188
+            if (strcmp($f,$uf) == 0) {
189 189
                 return true;
190 190
             }
191 191
         }
Please login to merge, or discard this patch.
html/inc/user.inc 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
         $user->id,
408 408
         $name
409 409
     );
410
-    if (function_exists("project_user_links")){
410
+    if (function_exists("project_user_links")) {
411 411
         $x .= project_user_links($user);
412 412
     }
413 413
     if ($badge_height) {
@@ -530,7 +530,7 @@  discard block
 block discarded – undo
530 530
 
531 531
 // return an object with data to show the user's community links
532 532
 //
533
-function get_community_links_object($user){
533
+function get_community_links_object($user) {
534 534
     $cache_object = new StdClass;
535 535
     $cache_object->post_count = total_posts($user);
536 536
     $cache_object->user = $user;
@@ -548,7 +548,7 @@  discard block
 block discarded – undo
548 548
 
549 549
 // show community links of another user (described by $clo)
550 550
 //
551
-function community_links($clo, $logged_in_user){
551
+function community_links($clo, $logged_in_user) {
552 552
     $user = $clo->user;
553 553
     if (!$user) {
554 554
         error_log("community_links(): null user\n");
Please login to merge, or discard this patch.
html/user/pm.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -279,7 +279,8 @@  discard block
 block discarded – undo
279 279
     $userids = array(); // To prevent from spamming a single user by adding it multiple times
280 280
 
281 281
     foreach ($users as $username) {
282
-        if (is_numeric($username)) {     // user ID is given
282
+        if (is_numeric($username)) {
283
+// user ID is given
283 284
             $userid = (int)$username;
284 285
             $user = BoincUser::lookup_id($userid);
285 286
             if ($user == null) {
@@ -289,7 +290,8 @@  discard block
 block discarded – undo
289 290
             $users = BoincUser::lookup_name($username);
290 291
             if (count($users) == 0) {
291 292
                 pm_form($replyto, $userid, tra("Could not find user with username %1", $username));
292
-            } elseif (count($users) > 1) { // Non-unique username
293
+            } elseif (count($users) > 1) {
294
+// Non-unique username
293 295
                 pm_form($replyto, $userid, tra("%1 is not a unique username; you will have to use user ID", $username));
294 296
             }
295 297
             $user = $users[0];
Please login to merge, or discard this patch.