@@ -54,18 +54,18 @@ |
||
| 54 | 54 | $f = fopen($targetFile, 'w'); |
| 55 | 55 | if ($f) { |
| 56 | 56 | switch ($error) { |
| 57 | - case UPLOAD_ERR_INI_SIZE: |
|
| 58 | - $message = addslashes(__("This file is too large.")); |
|
| 59 | - break; |
|
| 60 | - case UPLOAD_ERR_FORM_SIZE: |
|
| 61 | - $message = addslashes(__("Large files are not supported.")); |
|
| 62 | - break; |
|
| 63 | - case UPLOAD_ERR_PARTIAL: |
|
| 64 | - $message = addslashes(__("File was only partially uploaded.")); |
|
| 65 | - break; |
|
| 66 | - default: |
|
| 67 | - $message = sprintf(addslashes(__("Error code %s.")), $error); |
|
| 68 | - break; |
|
| 57 | + case UPLOAD_ERR_INI_SIZE: |
|
| 58 | + $message = addslashes(__("This file is too large.")); |
|
| 59 | + break; |
|
| 60 | + case UPLOAD_ERR_FORM_SIZE: |
|
| 61 | + $message = addslashes(__("Large files are not supported.")); |
|
| 62 | + break; |
|
| 63 | + case UPLOAD_ERR_PARTIAL: |
|
| 64 | + $message = addslashes(__("File was only partially uploaded.")); |
|
| 65 | + break; |
|
| 66 | + default: |
|
| 67 | + $message = sprintf(addslashes(__("Error code %s.")), $error); |
|
| 68 | + break; |
|
| 69 | 69 | } |
| 70 | 70 | fprintf($f, "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\""); |
| 71 | 71 | fprintf($f, "\"http://www.w3.org/TR/html4/strict.dtd\">"); |
@@ -119,7 +119,9 @@ |
||
| 119 | 119 | if (isset($hxff)) { |
| 120 | 120 | // Server is hidden behind a proxy. |
| 121 | 121 | // Proxy for loopback ip might indicate spoofing |
| 122 | - if (!in_array($hxff, array('127.0.0.1', '::1'))) $ip = $hxff; |
|
| 122 | + if (!in_array($hxff, array('127.0.0.1', '::1'))) { |
|
| 123 | + $ip = $hxff; |
|
| 124 | + } |
|
| 123 | 125 | } elseif (isset($_SERVER['REMOTE_ADDR'])) { |
| 124 | 126 | // Client has direct access to the server. |
| 125 | 127 | $ip = $_SERVER['REMOTE_ADDR']; |