private function copyFile( $sourcePath, $destPath, $flags=0 ) {
if( !file_exists( $sourcePath ) ) {
// Abort! Abort!
private function copyFile( $sourcePath, $destPath, $flags=0 ) {
if( !file_exists( $sourcePath ) ) {
// Abort! Abort!
function delete( $key ) {
$destPath = $this->filePath( $key );
if( false === $destPath ) {
function delete( $key ) {
$destPath = $this->filePath( $key );
if( false === $destPath ) {
* Confirm that the given file key is valid.
* Note that a valid key may refer to a file that does not exist.
*
* Confirm that the given file key is valid.
* Note that a valid key may refer to a file that does not exist.
*
* an optional alphanumeric extension, all lowercase.
* The whole must not exceed 64 characters.
*
* an optional alphanumeric extension, all lowercase.
* The whole must not exceed 64 characters.
*
- return preg_match( '/^[0-9a-z]{32}(\.[0-9a-z]{1,31})?$/', $key );
+ return preg_match( '/^[0-9a-z]{31,32}(\.[0-9a-z]{1,31})?$/', $key );
- $base36 = wfBaseConvert( $hash, 16, 36, 32 );
+ $base36 = wfBaseConvert( $hash, 16, 36, 31 );