Index: trunk/phase3/includes/filerepo/FSRepo.php |
— | — | @@ -226,13 +226,16 @@ |
227 | 227 | * @param string $srcPath The current location of the file. |
228 | 228 | */ |
229 | 229 | function storeTemp( $originalName, $srcPath ) { |
230 | | - $dstRel = $this->getHashPath( $originalName ) . |
231 | | - gmdate( "YmdHis" ) . '!' . $originalName; |
| 230 | + $date = gmdate( "YmdHis" ); |
| 231 | + $hashPath = $this->getHashPath( $originalName ); |
| 232 | + $dstRel = "$hashPath$date!$originalName"; |
| 233 | + $dstUrlRel = $hashPath . $date . '!' . rawurlencode( $originalName ); |
| 234 | + |
232 | 235 | $result = $this->store( $srcPath, 'temp', $dstRel ); |
233 | 236 | if ( WikiError::isError( $result ) ) { |
234 | 237 | return $result; |
235 | 238 | } else { |
236 | | - return $this->getVirtualUrl( "temp/$dstRel" ); |
| 239 | + return $this->getVirtualUrl( 'temp' ) . '/' . $dstUrlRel; |
237 | 240 | } |
238 | 241 | } |
239 | 242 | |