diff -Nur 1/mysite/code/Page.php 2/mysite/code/Page.php
|
1
|
2
|
|
| 38 | 38 | Requirements::themedCSS('typography'); |
| 39 | 39 | Requirements::themedCSS('form'); |
| 40 | 40 | } |
| 41 | | } |
| 42 | | No newline at end of file |
| | 41 | } |
diff -Nur 1/sapphire/filesystem/Folder.php 2/sapphire/filesystem/Folder.php
|
1
|
2
|
|
| 230 | 230 | if($oldFile == $file && $i > 2) user_error("Couldn't fix $file$ext with $i", E_USER_ERROR); |
| 231 | 231 | } |
| 232 | 232 | |
| 233 | | if (move_uploaded_file($tmpFile['tmp_name'], "$base/$file$ext")) { |
| | 233 | $success = false; |
| | 234 | if(!ini_get("open_basedir")) $success = move_uploaded_file($tmpFile['tmp_name'], "$base/$file$ext"); |
| | 235 | else $success = rename($tmpFile['tmp_name'], "$base/$file$ext"); |
| | 236 | |
| | 237 | if ($success) { |
| 234 | 238 | // Update with the new image |
| | 239 | chmod("$base/$file$ext", Filesystem::$file_create_mask); |
| 235 | 240 | return $this->constructChild(basename($file . $ext)); |
| 236 | 241 | } else { |
| 237 | 242 | if(!file_exists($tmpFile['tmp_name'])) user_error("Folder::addUploadToFolder: '$tmpFile[tmp_name]' doesn't exist", E_USER_ERROR); |
diff -Nur 1/sapphire/filesystem/Upload.php 2/sapphire/filesystem/Upload.php
|
1
|
2
|
|
| 461 | 461 | // we don't validate for empty upload fields yet |
| 462 | 462 | if(!isset($this->tmpFile['name']) || empty($this->tmpFile['name'])) return true; |
| 463 | 463 | |
| 464 | | if(isset($this->tmpFile['tmp_name']) && !is_uploaded_file($this->tmpFile['tmp_name']) && !SapphireTest::is_running_test()) { |
| | 464 | if(isset($this->tmpFile['tmp_name']) && !ini_get("open_basedir") && !is_uploaded_file($this->tmpFile['tmp_name']) && !SapphireTest::is_running_test()) { |
| 465 | 465 | $this->errors[] = _t('File.NOVALIDUPLOAD', 'File is not a valid upload'); |
| 466 | 466 | return false; |
| 467 | 467 | } |
| … |
… |
|
| 500 | 500 | return true; |
| 501 | 501 | } |
| 502 | 502 | |
| 503 | | } |
| 504 | | No newline at end of file |
| | 503 | } |