Index: trunk/phase3/includes/filerepo/FSRepo.php |
— | — | @@ -519,13 +519,13 @@ |
520 | 520 | if ( !isset( $this->simpleCleanPairs ) ) { |
521 | 521 | global $IP; |
522 | 522 | $this->simpleCleanPairs = array( |
523 | | - $this->directory => 'public', |
524 | | - "{$this->directory}/temp" => 'temp', |
| 523 | + $this->directory => "mwrepo://{$this->name}/public", |
| 524 | + "{$this->directory}/temp" => "mwrepo://{$this->name}/temp", |
525 | 525 | $IP => '$IP', |
526 | 526 | dirname( __FILE__ ) => '$IP/extensions/WebStore', |
527 | 527 | ); |
528 | 528 | if ( $this->deletedDir ) { |
529 | | - $this->simpleCleanPairs[$this->deletedDir] = 'deleted'; |
| 529 | + $this->simpleCleanPairs[$this->deletedDir] = "mwrepo://{$this->name}/deleted"; |
530 | 530 | } |
531 | 531 | } |
532 | 532 | return strtr( $param, $this->simpleCleanPairs ); |
Index: trunk/phase3/includes/filerepo/LocalRepo.php |
— | — | @@ -10,6 +10,21 @@ |
11 | 11 | var $fileFromRowFactory = array( 'LocalFile', 'newFromRow' ); |
12 | 12 | var $oldFileFromRowFactory = array( 'OldLocalFile', 'newFromRow' ); |
13 | 13 | |
| 14 | + function __construct( $info ) { |
| 15 | + parent::__construct( $info ); |
| 16 | + |
| 17 | + # Initialize simpleCleanPairs, to make errors less misleading |
| 18 | + global $IP; |
| 19 | + $this->simpleCleanPairs = array( |
| 20 | + $this->directory => '$wgUploadDirectory', |
| 21 | + wfTempDir() => '{wfTempDir()}', |
| 22 | + $IP => '$IP', |
| 23 | + ); |
| 24 | + if ( $this->deletedDir ) { |
| 25 | + $this->simpleCleanPairs[$this->deletedDir] = '{$wgFileStore[\'deleted\'][\'directory\']}'; |
| 26 | + } |
| 27 | + } |
| 28 | + |
14 | 29 | function getSlaveDB() { |
15 | 30 | return wfGetDB( DB_SLAVE ); |
16 | 31 | } |