Passed
Pull Request — master (#5668)
by David
09:16
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.