scratch – Diff between revs 44 and 47

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 44 Rev 47
Line 24... Line 24...
24 $fileExtension = pathinfo($name, PATHINFO_EXTENSION); 24 $fileExtension = pathinfo($name, PATHINFO_EXTENSION);
Line 25... Line 25...
25   25  
26 #### If the extension is not allowed then change it to a text extension. 26 #### If the extension is not allowed then change it to a text extension.
27 if (!isset($fileExtension) || 27 if (!isset($fileExtension) ||
28 !in_array(strtoupper($fileExtension), 28 !in_array(strtoupper($fileExtension),
-   29 array_map('strtoupper', $ALLOWED_FILE_EXTENSIONS))) {
29 array_map('strtoupper', $ALLOWED_FILE_EXTENSIONS))) 30 header("HTTP/1.1 500 Internal Server Error", true, 500);
-   31 return;
Line 30... Line 32...
30 $fileExtension = 'txt'; 32 }
31 33
32 #### Hash filename. 34 #### Hash filename.
33 $file = strtolower( 35 $file = strtolower(