http://www.mediawiki.org/wiki/Special:Code/MediaWiki/76304
Revision: 76304
Author: hartman
Date: 2010-11-08 14:46:26 +0000 (Mon, 08 Nov 2010)
Log Message:
-----------
Filerepo inconsistency. Use rawurlencode instead of urlencode.
Modified Paths:
--------------
trunk/phase3/includes/filerepo/ForeignAPIRepo.php
trunk/phase3/includes/filerepo/OldLocalFile.php
trunk/phase3/includes/filerepo/UnregisteredLocalFile.php
Modified: trunk/phase3/includes/filerepo/ForeignAPIRepo.php
===================================================================
--- trunk/phase3/includes/filerepo/ForeignAPIRepo.php 2010-11-08 14:39:08 UTC
(rev 76303)
+++ trunk/phase3/includes/filerepo/ForeignAPIRepo.php 2010-11-08 14:46:26 UTC
(rev 76304)
@@ -254,7 +254,7 @@
}
$localPath = $this->getZonePath( 'thumb' ) . "/" .
$this->getHashPath( $name ) . $name;
$localFilename = $localPath . "/" . $fileName;
- $localUrl = $this->getZoneUrl( 'thumb' ) . "/" .
$this->getHashPath( $name ) . urlencode( $name ) . "/" . urlencode( $fileName );
+ $localUrl = $this->getZoneUrl( 'thumb' ) . "/" .
$this->getHashPath( $name ) . rawurlencode( $name ) . "/" . rawurlencode(
$fileName );
if( file_exists( $localFilename ) && isset(
$metadata['timestamp'] ) ) {
wfDebug( __METHOD__ . " Thumbnail was already
downloaded before\n" );
Modified: trunk/phase3/includes/filerepo/OldLocalFile.php
===================================================================
--- trunk/phase3/includes/filerepo/OldLocalFile.php 2010-11-08 14:39:08 UTC
(rev 76303)
+++ trunk/phase3/includes/filerepo/OldLocalFile.php 2010-11-08 14:46:26 UTC
(rev 76304)
@@ -139,7 +139,7 @@
}
function getUrlRel() {
- return 'archive/' . $this->getHashPath() . urlencode(
$this->getArchiveName() );
+ return 'archive/' . $this->getHashPath() . rawurlencode(
$this->getArchiveName() );
}
function upgradeRow() {
Modified: trunk/phase3/includes/filerepo/UnregisteredLocalFile.php
===================================================================
--- trunk/phase3/includes/filerepo/UnregisteredLocalFile.php 2010-11-08
14:39:08 UTC (rev 76303)
+++ trunk/phase3/includes/filerepo/UnregisteredLocalFile.php 2010-11-08
14:46:26 UTC (rev 76304)
@@ -100,7 +100,7 @@
function getURL() {
if ( $this->repo ) {
- return $this->repo->getZoneUrl( 'public' ) . '/' .
$this->repo->getHashPath( $this->name ) . urlencode( $this->name );
+ return $this->repo->getZoneUrl( 'public' ) . '/' .
$this->repo->getHashPath( $this->name ) . rawurlencode( $this->name );
} else {
return false;
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs