diff --git a/functions.php b/functions-new.php
index 771583d..433212e 100755
old
|
new
|
function iis7_supports_permalinks() { |
4238 | 4238 | * return value of '2' means that the $file contains ':' after the first |
4239 | 4239 | * character. A return value of '3' means that the file is not in the allowed |
4240 | 4240 | * files list. |
| 4241 | * A return value of 4 considers a special case when file is uploaded from Windows. |
| 4242 | * In Windows environment a typical file path is like 'c:\foldername\filename.ext' |
4241 | 4243 | * |
4242 | 4244 | * @since 1.2.0 |
4243 | 4245 | * |
… |
… |
function validate_file( $file, $allowed_files = '' ) { |
4256 | 4258 | if ( ! empty( $allowed_files ) && ! in_array( $file, $allowed_files ) ) |
4257 | 4259 | return 3; |
4258 | 4260 | |
| 4261 | //Takes file upload from Windows environment into considertation |
| 4262 | if(false !== strpos($file, '\\')) { |
| 4263 | $file = substr(strrchr($file, "\\"), 1); |
| 4264 | if (false !== strpos( $file, ':' ) ) |
| 4265 | return 4; |
| 4266 | } |
| 4267 | |
4259 | 4268 | if (':' == substr( $file, 1, 1 ) ) |
4260 | 4269 | return 2; |
4261 | 4270 | |