Passed
Push — dpa_web15 ( 443889...c08cd5 )
by David
09:57
created
html/user/job_file.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 require_once("../inc/submit_util.inc");
80 80
 
81 81
 function upload_error_description($errno) {
82
-    switch($errno) {
82
+    switch ($errno) {
83 83
         case UPLOAD_ERR_INI_SIZE:
84 84
             return "The uploaded file exceeds upload_max_filesize of php.ini."; break;
85 85
         case UPLOAD_ERR_FORM_SIZE:
@@ -105,16 +105,16 @@  discard block
 block discarded – undo
105 105
     $delete_time = (int)$r->delete_time;
106 106
     $batch_id = (int)$r->batch_id;
107 107
     $fanout = parse_config(get_config(), "<uldl_dir_fanout>");
108
-    $phys_names= array();
109
-    foreach($r->phys_name as $f) {
108
+    $phys_names = array();
109
+    foreach ($r->phys_name as $f) {
110 110
         $phys_names[] = (string)$f;
111 111
     }
112 112
     $i = 0;
113
-    foreach($phys_names as $fname) {
113
+    foreach ($phys_names as $fname) {
114 114
         if (!is_valid_filename($fname)) {
115 115
             xml_error(-1, 'bad filename');
116 116
         }
117
-        $path = dir_hier_path($fname, project_dir() . "/download", $fanout);
117
+        $path = dir_hier_path($fname, project_dir()."/download", $fanout);
118 118
 
119 119
         // if the job_file record is there,
120 120
         // update the delete time first to avoid race condition
@@ -228,11 +228,11 @@  discard block
 block discarded – undo
228 228
     foreach ($_FILES as $f) {
229 229
         $tmp_name = $f['tmp_name'];
230 230
         $fname = $phys_names[$i];
231
-        $path = dir_hier_path($fname, project_dir() . "/download", $fanout);
231
+        $path = dir_hier_path($fname, project_dir()."/download", $fanout);
232 232
 
233 233
         // see if file is in download hierarchy
234 234
         //
235
-        switch(check_download_file($tmp_name, $path)) {
235
+        switch (check_download_file($tmp_name, $path)) {
236 236
         case 0:
237 237
             // file is already there
238 238
             // note: check_download_file() generates .md5 in cases 1 and 2
@@ -287,10 +287,10 @@  discard block
 block discarded – undo
287 287
 if ($request_log) {
288 288
     $request_log_dir = parse_config(get_config(), "<log_dir>");
289 289
     if ($request_log_dir) {
290
-        $request_log = $request_log_dir . "/" . $request_log;
290
+        $request_log = $request_log_dir."/".$request_log;
291 291
     }
292 292
     if ($file = fopen($request_log, "a+")) {
293
-        fwrite($file, "\n<job_file date=\"" . date(DATE_ATOM) . "\">\n" . $_POST['request'] . "\n</job_file>\n");
293
+        fwrite($file, "\n<job_file date=\"".date(DATE_ATOM)."\">\n".$_POST['request']."\n</job_file>\n");
294 294
         fclose($file);
295 295
     }
296 296
 }
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
     xml_error(-1, "can't parse request message: ".htmlspecialchars($req), __FILE__, __LINE__);
303 303
 }
304 304
 
305
-switch($r->getName()) {
305
+switch ($r->getName()) {
306 306
 case 'query_files':
307 307
     query_files($r);
308 308
     break;
Please login to merge, or discard this patch.