required.
&$apis: array of services
+'ApiTokensGetTokenTypes': use this hook to extend action=tokens with new
+token types.
+&$tokenTypes: supported token types in format 'type' => callback function
+used to retrieve this type of tokens.
+
'ArticleAfterFetchContent': after fetching content of an article from
the database
$article: the article (object) being loaded from the database
$user: user who performed the deletion
$reason: reason
+ 'FileTransformed': When a file is transformed and moved into storage
+ $file: reference to the File object
+ $thumb: the MediaTransformOutput object
+ $tmpThumbPath: The temporary file system path of the transformed file
+ $thumbPath: The permanent storage path of the transformed file
+
'FileUpload': When a file upload occurs
$file : Image object representing the file that was uploaded
$reupload : Boolean indicating if there was a previously another image there or not (since 1.17)
}
}
+ // If the backend is ready-only, don't keep generating thumbnails
+ // only to return transformation errors, just return the error now.
+ if ( $this->repo->getReadOnlyReason() !== false ) {
+ $thumb = $this->transformErrorOutput( $thumbPath, $thumbUrl, $params, $flags );
+ break;
+ }
+
// Create a temp FS file with the same extension and the thumbnail
$thumbExt = FileBackend::extensionFromPath( $thumbPath );
$tmpFile = TempFSFile::factory( 'transform_', $thumbExt );
} else {
$thumb = $this->transformErrorOutput( $thumbPath, $thumbUrl, $params, $flags );
}
+ // Give extensions a chance to do something with this thumbnail...
+ wfRunHooks( 'FileTransformed', array( $this, $thumb, $tmpThumbPath, $thumbPath ) );
}
// Purge. Useful in the event of Core -> Squid connection failure or squid