Passed
Pull Request — master (#5850)
by
unknown
16:24 queued 07:40
created
html/user/sandbox.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     } else {
68 68
         sort($files);
69 69
         start_table();
70
-        table_header("Name<br><p class=\"text-muted\">(click to view)</p>", "Modified", "Size (bytes)", "MD5", "Delete","Download");
70
+        table_header("Name<br><p class=\"text-muted\">(click to view)</p>", "Modified", "Size (bytes)", "MD5", "Delete", "Download");
71 71
         foreach ($files as $f) {
72 72
             $path = "$dir/$f";
73 73
             list($error, $size, $md5) = sandbox_parse_link_file($path);
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         $s = stat($tmp_name);
118 118
         $size = $s['size'];
119 119
         [$exists, $elf] = sandbox_lf_exists($user, $md5);
120
-        if (!$exists){
120
+        if (!$exists) {
121 121
             // move file to download dir
122 122
             //
123 123
             $phys_path = sandbox_physical_path($user, $md5);
@@ -150,9 +150,9 @@  discard block
 block discarded – undo
150 150
         error_page("physical file is missing");
151 151
     }
152 152
     $bused = sandbox_file_in_use($user, $name);
153
-    if ($bused){
153
+    if ($bused) {
154 154
         $notice = "<strong>$name</strong> is being used by batch(es), you can not delete it now!<br/>";
155
-    } else{
155
+    } else {
156 156
         unlink("$dir/$name");
157 157
         $notice = "<strong>$name</strong> was deleted from your sandbox<br/>";
158 158
         [$exists, $elf] = sandbox_lf_exists($user, $md5);
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 if (!$action) $action = post_str('action', true);
197 197
 
198 198
 switch ($action) {
199
-case '': list_files($user,""); break;
199
+case '': list_files($user, ""); break;
200 200
 case 'upload_file': upload_file($user); break;
201 201
 case 'delete_file': delete_file($user); break;
202 202
 case 'download_file': download_file($user); break;
Please login to merge, or discard this patch.
html/ops/check_account_ownership_keys.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,15 +23,15 @@
 block discarded – undo
23 23
 admin_page_head("Account Ownership Keys");
24 24
 
25 25
 if (!file_exists($account_ownership_private_key_file_path)) {
26
-  echo "<p>The account ownership private key '" . $account_ownership_private_key_file_name . "' <b>doesn't</b> exist. Please run the 'generate_account_ownership_keys.php' script from the command line in the BOINC web server ops directory.</p>";
26
+  echo "<p>The account ownership private key '".$account_ownership_private_key_file_name."' <b>doesn't</b> exist. Please run the 'generate_account_ownership_keys.php' script from the command line in the BOINC web server ops directory.</p>";
27 27
 } else {
28
-  echo "<p>The account ownership private key '" . $account_ownership_private_key_file_name . "' exists.</p>";
28
+  echo "<p>The account ownership private key '".$account_ownership_private_key_file_name."' exists.</p>";
29 29
 }
30 30
 
31 31
 if (!file_exists($account_ownership_public_key_file_path)) {
32
-  echo "<p>The account ownership public key '" . $account_ownership_public_key_file_name . "' <b>doesn't</b> exist. Please run the 'generate_account_ownership_keys.php' script from the command line in the BOINC web server ops directory.</p>";
32
+  echo "<p>The account ownership public key '".$account_ownership_public_key_file_name."' <b>doesn't</b> exist. Please run the 'generate_account_ownership_keys.php' script from the command line in the BOINC web server ops directory.</p>";
33 33
 } else {
34
-  echo "<p>The account ownership public key '" . $account_ownership_public_key_file_name . "' exists.</p>";
34
+  echo "<p>The account ownership public key '".$account_ownership_public_key_file_name."' exists.</p>";
35 35
 }
36 36
 
37 37
 echo "<p>For more info see the related wiki page: <a href=\"https://github.com/BOINC/boinc/wiki/ProofOfOwnership\">ProofOfOwnership</a></p>";
Please login to merge, or discard this patch.
html/inc/submit_util.inc 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         }
137 137
     }
138 138
     if ($fp_total) {
139
-        $batch->fraction_done = $fp_done / $fp_total;
139
+        $batch->fraction_done = $fp_done/$fp_total;
140 140
     }
141 141
     if ($completed && $batch->state == BATCH_STATE_IN_PROGRESS) {
142 142
         $batch->state = BATCH_STATE_COMPLETE;
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 // get the total size of output files of a batch
228 228
 //
229 229
 function batch_output_file_size($batchid) {
230
-    $batch_td_size=0;
230
+    $batch_td_size = 0;
231 231
     $wus = BoincWorkunit::enum("batch=$batchid");
232 232
     $fanout = parse_config(get_config(), "<uldl_dir_fanout>");
233 233
     $upload_dir = parse_config(get_config(), "<upload_dir>");
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 }
258 258
 
259 259
 function boinc_get_wu_output_files_url($user, $wu_id) {
260
-    $auth_str =  md5($user->authenticator.$wu_id);
260
+    $auth_str = md5($user->authenticator.$wu_id);
261 261
     return "get_output.php?cmd=workunit_files&wu_id=$wu_id&auth_str=$auth_str";
262 262
 }
263 263
 
Please login to merge, or discard this patch.
html/inc/dir_hier.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
 }
38 38
 
39 39
 function upload_path($filename) {
40
-    static $upload_dir=null;
40
+    static $upload_dir = null;
41 41
     if (!$upload_dir) {
42 42
         $config = get_config();
43 43
         $upload_dir = parse_config($config, '<upload_dir>');
Please login to merge, or discard this patch.
html/user/get_output2.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     if ($user->authenticator != $auth) die('bad auth');
52 52
 }
53 53
 
54
-function do_result_aux($result, $batch, $file_num=null) {
54
+function do_result_aux($result, $batch, $file_num = null) {
55 55
     $phys_names = get_outfile_names($result);
56 56
     $log_names = get_outfile_log_names($result);
57 57
     if ($file_num !== null) {
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         $dir_path = "submit/$batch->id/$result->name";
72 72
         system("rm -r $dir_path");
73 73
         mkdir($dir_path);
74
-        for ($i=0; $i<count($phys_names); $i++) {
74
+        for ($i = 0; $i < count($phys_names); $i++) {
75 75
             $cmd = sprintf('ln -s %s %s/%s',
76 76
                 upload_path($phys_names[$i]),
77 77
                 $dir_path,
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     }
89 89
 }
90 90
 
91
-function do_result($result_id, $auth, $file_num=null) {
91
+function do_result($result_id, $auth, $file_num = null) {
92 92
     $result = BoincResult::lookup_id($result_id);
93 93
     if (!$result) die("no result $result_id");
94 94
     $workunit = BoincWorkunit::lookup_id($result->workunitid);
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
             system($cmd);
136 136
         } else {
137 137
             mkdir(sprintf('%s/%s', $dir_path, $result->name));
138
-            for ($i=0; $i<count($phys_names); $i++) {
138
+            for ($i = 0; $i < count($phys_names); $i++) {
139 139
                 $cmd = sprintf('ln -s %s %s/%s/%s',
140 140
                     upload_path($phys_names[$i]),
141 141
                     $dir_path,
Please login to merge, or discard this patch.
html/inc/cert.inc 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,10 +43,10 @@  discard block
 block discarded – undo
43 43
     credit_to_ops($credit, $ops, $unit);
44 44
 
45 45
     if ($bolden) {
46
-        $lbold="[[";
47
-        $rbold="]]";
46
+        $lbold = "[[";
47
+        $rbold = "]]";
48 48
     } else {
49
-        $lbold="";        $rbold="";
49
+        $lbold = ""; $rbold = "";
50 50
     }
51 51
     return " $lbold$cobbs Cobblestones$rbold of computation ($ops $unit floating-point operations)";
52 52
 }
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 //
87 87
 function show_share_buttons() {
88 88
     echo '<p>';
89
-    $current_url = (empty($_SERVER['HTTPS']) ? 'http' : 'https') . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
89
+    $current_url = (empty($_SERVER['HTTPS']) ? 'http' : 'https')."://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
90 90
     $cert_url = urlencode($current_url);
91 91
 
92 92
     // Share on Facebook
Please login to merge, or discard this patch.
html/user/cert_team.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,10 +27,10 @@  discard block
 block discarded – undo
27 27
 if (DISABLE_TEAMS) error_page("Teams are disabled");
28 28
 
29 29
 $border = get_str("border", true);
30
-if ($border=="no") {
31
-    $border=0;
30
+if ($border == "no") {
31
+    $border = 0;
32 32
 } else {
33
-    $border=8;
33
+    $border = 8;
34 34
 }
35 35
 
36 36
 // Make sure user_id is in the URL so that share functions work
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 if (!$user_id) {
40 40
     $user = get_logged_in_user();
41 41
     Header(sprintf('Location: %s/cert_team.php?user_id=%d%s',
42
-        url_base(), $user->id, $border==0?'&border=no':''
42
+        url_base(), $user->id, $border == 0 ? '&border=no' : ''
43 43
     ));
44 44
     exit;
45 45
 }
Please login to merge, or discard this patch.
html/user/cert1.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
 require_once("../inc/cert.inc");
25 25
 
26 26
 $border = get_str("border", true);
27
-if ($border=="no") {
28
-    $border=0;
27
+if ($border == "no") {
28
+    $border = 0;
29 29
 } else {
30
-    $border=8;
30
+    $border = 8;
31 31
 }
32 32
 
33 33
 // Make sure user_id is in the URL so that share functions work
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 if (!$user_id) {
37 37
     $user = get_logged_in_user();
38 38
     Header(sprintf('Location: %s/cert1.php?user_id=%d%s',
39
-        url_base(), $user->id, $border==0?'&border=no':''
39
+        url_base(), $user->id, $border == 0 ? '&border=no' : ''
40 40
     ));
41 41
     exit;
42 42
 }
Please login to merge, or discard this patch.
html/user/cert_all.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -25,10 +25,10 @@  discard block
 block discarded – undo
25 25
 require_once("../inc/user.inc");
26 26
 
27 27
 $border = get_str("border", true);
28
-if ($border=="no") {
29
-    $border=0;
28
+if ($border == "no") {
29
+    $border = 0;
30 30
 } else {
31
-    $border=8;
31
+    $border = 8;
32 32
 }
33 33
 
34 34
 // Make sure user_id is in the URL so that share functions work
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 if (!$user_id) {
38 38
     $user = get_logged_in_user();
39 39
     Header(sprintf('Location: %s/cert_all.php?user_id=%d%s',
40
-        url_base(), $user->id, $border==0?'&border=no':''
40
+        url_base(), $user->id, $border == 0 ? '&border=no' : ''
41 41
     ));
42 42
     exit;
43 43
 }
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
     <tr><th align=left>Project</th><th align=left>Cobblestones</th><th align=left>Joined</th></tr>
92 92
 ";
93 93
 foreach ($user->projects as $p) {
94
-    if ($p->total_credit<100) continue;
94
+    if ($p->total_credit < 100) continue;
95 95
     show_proj($p);
96 96
 }
97 97
 echo "
Please login to merge, or discard this patch.