Go to the documentation of this file.
40 # Example of what we receive:
42 # $dstPath: /tmp/transform_7d0a7a2f1a09-1.jpg
43 # $dstUrl : http://example.com/images/thumb/0/09/Bad.jpg/320px-Bad.jpg
44 # $params: width: 320, descriptionUrl http://trunk.dev/wiki/File:Bad.jpg
46 $that->normaliseParams( $image,
$params );
48 $scalerParams =
array(
49 # The size to which the image
will be resized
50 'physicalWidth' =>
$params[
'physicalWidth'],
51 'physicalHeight' =>
$params[
'physicalHeight'],
52 'physicalDimensions' =>
"{$params['physicalWidth']}x{$params['physicalHeight']}",
54 'clientWidth' =>
$params[
'width'],
55 'clientHeight' =>
$params[
'height'],
56 # Comment
as will be added to the EXIF
of the thumbnail
57 'comment' => isset(
$params[
'descriptionUrl'] ) ?
58 "File source: {$params['descriptionUrl']}" :
'',
59 # Properties
of the original image
60 'srcWidth' => $image->getWidth(),
61 'srcHeight' => $image->getHeight(),
62 'mimeType' => $image->getMimeType(),
63 'dstPath' => $dstPath,
67 # In some cases, we do not bother generating a thumbnail.
68 if ( !$image->mustRender() &&
69 $scalerParams[
'physicalWidth'] == $scalerParams[
'srcWidth']
70 && $scalerParams[
'physicalHeight'] == $scalerParams[
'srcHeight']
72 wfDebug( __METHOD__ .
": returning unscaled image\n" );
74 return $that->doClientImage( $image, $scalerParams );
Media transform output for images.
static doFakeTransform( $that, $image, $dstPath, $dstUrl, $params, $flags=0)
Override BitmapHandler::doTransform() making sure we do not generate a thumbnail at all.
globals txt Globals are evil The original MediaWiki code relied on globals for processing context far too often MediaWiki development since then has been a story of slowly moving context out of global variables and into objects Storing processing context in object member variables allows those objects to be reused in a much more flexible way Consider the elegance of
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
it s the revision text itself In either if gzip is the revision text is gzipped $flags
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
</td >< td > &</td >< td > t want your writing to be edited mercilessly and redistributed at will
wfDebug( $text, $dest='all')
Sends a line to the debug log if enabled or, optionally, to a comment in output.
We ve cleaned up the code here by removing clumps of infrequently used code and moving them off somewhere else It s much easier for someone working with this code to see what s _really_ going on
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
do that in ParserLimitReportFormat instead use this to modify the parameters of the image and a DIV can begin in one section and end in another Make sure your code can handle that case gracefully See the EditSectionClearerLink extension for an example zero but section is usually empty its values are the globals values my talk page