Index: trunk/phase3/includes/filerepo/ForeignAPIRepo.php |
— | — | @@ -188,7 +188,7 @@ |
189 | 189 | $foreignUrl = $this->getThumbUrl( $name, $width, $height ); |
190 | 190 | |
191 | 191 | // We need the same filename as the remote one :) |
192 | | - $fileName = ltrim( substr( $foreignUrl, strrpos( $foreignUrl, '/' ) ), '/' ); |
| 192 | + $fileName = rawurldecode( pathinfo( $foreignUrl, PATHINFO_BASENAME ) ); |
193 | 193 | $path = 'thumb/' . $this->getHashPath( $name ) . $name . "/"; |
194 | 194 | if ( !is_dir($wgUploadDirectory . '/' . $path) ) { |
195 | 195 | wfMkdirParents($wgUploadDirectory . '/' . $path); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -520,6 +520,7 @@ |
521 | 521 | by disable_functions |
522 | 522 | * (bug 20726) Title::getLatestRevID's documentation now says that the function |
523 | 523 | returns false if the page doesn't exist |
| 524 | +* (bug 20751) ForeignApiRepo now urldecodes filenames when saving to local cache |
524 | 525 | |
525 | 526 | == API changes in 1.16 == |
526 | 527 | |