public function getDescriptionRenderUrl( $name, $lang = null ) {
$query = 'action=render';
if ( !is_null( $lang ) ) {
- $query .= '&uselang=' . $lang;
+ $query .= '&uselang=' . urlencode( $lang );
}
if ( isset( $this->scriptDirUrl ) ) {
return $this->makeUrl(
/**
* Pick a random name in the temp zone and store a file to it.
- * Returns a FileRepoStatus object with the file Virtual URL in the value,
+ * Returns a Status object with the file Virtual URL in the value,
* file can later be disposed using FileRepo::freeTemp().
*
* @param string $originalName The base name of the file as specified
* Copy or move a file either from a storage path, virtual URL,
* or file system path, into this repository at the specified destination location.
*
- * Returns a FileRepoStatus object. On success, the value contains "new" or
+ * Returns a Status object. On success, the value contains "new" or
* "archived", to indicate whether the file was new with that name.
*
* Options to $options include:
'dst' => $archivePath,
// We may have 2+ identical files being deleted,
// all of which will map to the same destination file
- 'overwriteSame' => true // also see bug 31792
+ 'overwriteSame' => true // also see T33792
];
}
$path = $this->resolveToStoragePath( $virtualUrl );
$params = [ 'src' => $path, 'headers' => $headers, 'options' => $optHeaders ];
+ // T172851: HHVM does not flush the output properly, causing OOM
+ ob_start( null, 1048576 );
+ ob_implicit_flush( true );
+
$status = $this->newGood();
$status->merge( $this->backend->streamFile( $params ) );
+ ob_end_flush();
+
return $status;
}