| @@ 149-151 (lines=3) @@ | ||
| 146 | } |
|
| 147 | // Use the name of the uploaded file? |
|
| 148 | // If no filename specified, use the name of the uploaded file? |
|
| 149 | if (!$filename && !empty($_FILES['mediafile']['name'])) { |
|
| 150 | $filename = $_FILES['mediafile']['name']; |
|
| 151 | } |
|
| 152 | ||
| 153 | // Validate the media path and filename |
|
| 154 | if (preg_match('/^https?:\/\//i', $text[0], $match)) { |
|
| @@ 110-112 (lines=3) @@ | ||
| 107 | // User-specified filename? |
|
| 108 | $filename = Filter::post('filename' . $i); |
|
| 109 | // Use the name of the uploaded file? |
|
| 110 | if (!$filename && !empty($_FILES['mediafile' . $i]['name'])) { |
|
| 111 | $filename = $_FILES['mediafile' . $i]['name']; |
|
| 112 | } |
|
| 113 | ||
| 114 | // Validate the media path and filename |
|
| 115 | if (preg_match('/([\/\\\\<>])/', $filename, $match)) { |
|