Test Setup Failed
Branch master (06667f)
by Marcio
01:26
created
Upload/Uploads.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,11 +70,11 @@
 block discarded – undo
70 70
                 if (!file_exists(DIR_FILE . 'Upload'  . DS . $dir . DS)) {
71 71
                     mkdir(DIR_FILE . 'Upload' .  DS . $dir . DS, 0777, true);
72 72
                   
73
-                  }  // chmod('uploads/', 0755);
73
+                    }  // chmod('uploads/', 0755);
74 74
                 else if (!file_exists(DIR_FILE . 'Upload' . DS . 'Default' . DS . $dir . DS)) {
75 75
                     mkdir(DIR_FILE . 'Upload' . DS . 'Default' . DS . $dir . DS, 0777, true);
76 76
                   
77
-                  }  // chmod('uploads/', 0755);
77
+                    }  // chmod('uploads/', 0755);
78 78
                 
79 79
                 if (move_uploaded_file($this->tmp, $this->path )) {
80 80
                     $output = '<div class="btn btn-success">';
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  */
18 18
 
19 19
 
20
-class Uploads  {
20
+class Uploads {
21 21
 
22 22
    
23 23
     private $files;
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
 
68 68
             if (empty($errors)) {
69 69
               
70
-                if (!file_exists(DIR_FILE . 'Upload'  . DS . $dir . DS)) {
71
-                    mkdir(DIR_FILE . 'Upload' .  DS . $dir . DS, 0777, true);
70
+                if (!file_exists(DIR_FILE . 'Upload' . DS . $dir . DS)) {
71
+                    mkdir(DIR_FILE . 'Upload' . DS . $dir . DS, 0777, true);
72 72
                   
73 73
                   }  // chmod('uploads/', 0755);
74 74
                 else if (!file_exists(DIR_FILE . 'Upload' . DS . 'Default' . DS . $dir . DS)) {
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
                   
77 77
                   }  // chmod('uploads/', 0755);
78 78
                 
79
-                if (move_uploaded_file($this->tmp, $this->path )) {
79
+                if (move_uploaded_file($this->tmp, $this->path)) {
80 80
                     $output = '<div class="btn btn-success">';
81 81
                     $output .= 'Ficheiro carregado  com sucesso';
82 82
                     $output .= '</div>';
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,8 +54,9 @@
 block discarded – undo
54 54
                     } else {
55 55
                         $allowed = array('jpg', 'JPG', 'jpeg', 'gif', 'btm', 'png', 'txt', 'docx', 'doc', 'pdf', 'mp3');
56 56
 
57
-                        if (in_array($ext, $allowed) === false)
58
-                            return $errors[] = '<div class="btn btn-danger">A extensao do ficheiro nao foi permitido </div>';
57
+                        if (in_array($ext, $allowed) === false) {
58
+                                                    return $errors[] = '<div class="btn btn-danger">A extensao do ficheiro nao foi permitido </div>';
59
+                        }
59 60
                     }
60 61
 //                              100000000
61 62
                     $max_size = 100000000;
Please login to merge, or discard this patch.