Passed
Pull Request — master (#20)
by
unknown
02:28
created
upload/song.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
     <body> 
13 13
         <?php require(__DIR__ . "/../important/header.php"); 
14 14
         
15
-        if(@$_POST['submit']) {
15
+        if (@$_POST['submit']) {
16 16
             $register = require(__DIR__ . "/../func/upload.php");
17 17
             $register("song", ["ogg", "mp3"]);
18 18
         }
Please login to merge, or discard this patch.
upload/chiptune.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
     <body> 
13 13
         <?php require(__DIR__ . "/../important/header.php"); 
14 14
         
15
-        if(@$_POST['submit']) {
15
+        if (@$_POST['submit']) {
16 16
             $register = require(__DIR__ . "/../func/upload.php");
17 17
             $register("chiptune", ["xm", "mod", "s3m", "it"]);
18 18
         }
Please login to merge, or discard this patch.
func/upload.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 return function($type, $allowedFileTypes) {
3
-    if(isset($_SESSION['user'])) {
3
+    if (isset($_SESSION['user'])) {
4 4
         $fileType = strtolower(pathinfo($_FILES["fileToUpload"]["name"], PATHINFO_EXTENSION));
5 5
         $target_dir = __DIR__ . "/../dynamic/" . $type . "/";
6 6
         $target_name = md5_file($_FILES["fileToUpload"]["tmp_name"]) . "." . $fileType;
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
             $movedFile = move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file);
16 16
         }
17 17
 
18
-        if(!in_array($fileType, $allowedFileTypes)) {
18
+        if (!in_array($fileType, $allowedFileTypes)) {
19 19
             echo 'unsupported file type. must be one of ' . join(", ", $allowedFileTypes) . '<hr>';
20 20
             $uploadOk = 0;
21 21
         }
Please login to merge, or discard this patch.