Go to the documentation of this file.
35 }
catch ( Exception
$e ) {
37 wfDebug( __METHOD__ .
': ' .
$e->getMessage() .
"\n" );
42 return serialize( $parsedGIFMetadata );
51 if ( count( $meta ) === 0 ) {
69 $meta = unserialize( $meta );
70 if ( !isset( $meta[
'metadata'] ) ) {
73 unset( $meta[
'metadata'][
'_MW_GIF_VERSION'] );
75 return $meta[
'metadata'];
85 $ser = $image->getMetadata();
87 $metadata = unserialize( $ser );
89 return $image->getWidth() * $image->getHeight() * $metadata[
'frameCount'];
91 return $image->getWidth() * $image->getHeight();
100 $ser = $image->getMetadata();
102 $metadata = unserialize( $ser );
103 if ( $metadata[
'frameCount'] > 1 ) {
117 global $wgMaxAnimatedGifArea;
128 if ( $metadata === self::BROKEN_FILE ) {
134 $data = unserialize( $metadata );
137 if ( !$data || !is_array( $data ) ) {
138 wfDebug( __METHOD__ .
" invalid GIF metadata\n" );
143 if ( !isset( $data[
'metadata'][
'_MW_GIF_VERSION'] )
146 wfDebug( __METHOD__ .
" old but compatible GIF metadata\n" );
161 $original = parent::getLongDesc( $image );
164 $metadata = unserialize( $image->getMetadata() );
167 if ( !$metadata || $metadata[
'frameCount'] <= 1 ) {
175 if ( $metadata[
'looped'] ) {
176 $info[] =
wfMessage(
'file-info-gif-looped' )->parse();
179 if ( $metadata[
'frameCount'] > 1 ) {
180 $info[] =
wfMessage(
'file-info-gif-frames' )->numParams( $metadata[
'frameCount'] )->parse();
183 if ( $metadata[
'duration'] ) {
184 $info[] =
$wgLang->formatTimePeriod( $metadata[
'duration'] );
187 return $wgLang->commaList( $info );
canAnimateThumbnail( $file)
We cannot animate thumbnails that are bigger than a particular size.
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
getMetadata()
Get handler-specific metadata Overridden by LocalFile, UnregisteredLocalFile STUB.
wfSuppressWarnings( $end=false)
Reference-counted warning suppression.
getMetadata( $image, $filename)
Get handler-specific metadata which will be saved in the img_metadata field.
Implements some public methods and some protected utility functions which are required by multiple ch...
wfRestoreWarnings()
Restore error level to previous value.
Generic handler for bitmap images.
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing after in associative array form externallinks including delete and has completed for all link tables default is conds Array Extra conditions for the No matching items in log is displayed if loglist is empty msgKey Array If you want a nice box with a set this to the key of the message First element is the message additional optional elements are parameters for the key that are processed with wfMessage() -> params() ->parseAsBlock() - offset Set to overwrite offset parameter in $wgRequest set to '' to unset offset - wrap String Wrap the message in html(usually something like "<
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
when a variable name is used in a it is silently declared as a new masking the global
getCommonMetaArray(File $image)
Return the standard metadata elements for #filemetadata parser func.
wfDebug( $text, $dest='all')
Sends a line to the debug log if enabled or, optionally, to a comment in output.
isMetadataValid( $image, $metadata)
Check if the metadata string is valid for this handler.
if(PHP_SAPI !='cli') $file
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser and also has some character encoding functions and other locale stuff The current user interface language is instantiated as $wgLang
getMetadataType( $image)
Get a string describing the type of metadata, for display purposes.