Go to the documentation of this file.
40 }
catch ( Exception
$e ) {
42 wfDebug( __METHOD__ .
': ' .
$e->getMessage() .
"\n" );
47 return serialize( $metadata );
56 if ( count( $meta ) === 0 ) {
75 $meta = unserialize( $meta );
76 if ( !isset( $meta[
'metadata'] ) ) {
79 unset( $meta[
'metadata'][
'_MW_PNG_VERSION'] );
81 return $meta[
'metadata'];
89 $ser = $image->getMetadata();
91 $metadata = unserialize( $ser );
92 if ( $metadata[
'frameCount'] > 1 ) {
115 if ( $metadata === self::BROKEN_FILE ) {
121 $data = unserialize( $metadata );
124 if ( !$data || !is_array( $data ) ) {
125 wfDebug( __METHOD__ .
" invalid png metadata\n" );
130 if ( !isset( $data[
'metadata'][
'_MW_PNG_VERSION'] )
133 wfDebug( __METHOD__ .
" old but compatible png metadata\n" );
147 $original = parent::getLongDesc( $image );
150 $metadata = unserialize( $image->getMetadata() );
153 if ( !$metadata || $metadata[
'frameCount'] <= 0 ) {
160 if ( $metadata[
'loopCount'] == 0 ) {
161 $info[] =
wfMessage(
'file-info-png-looped' )->parse();
162 } elseif ( $metadata[
'loopCount'] > 1 ) {
163 $info[] =
wfMessage(
'file-info-png-repeat' )->numParams( $metadata[
'loopCount'] )->parse();
166 if ( $metadata[
'frameCount'] > 0 ) {
167 $info[] =
wfMessage(
'file-info-png-frames' )->numParams( $metadata[
'frameCount'] )->parse();
170 if ( $metadata[
'duration'] ) {
171 $info[] =
$wgLang->formatTimePeriod( $metadata[
'duration'] );
174 return $wgLang->commaList( $info );
canAnimateThumbnail( $image)
We do not support making APNG thumbnails, so always false.
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
isMetadataValid( $image, $metadata)
Check if the metadata string is valid for this handler.
getMetadata()
Get handler-specific metadata Overridden by LocalFile, UnregisteredLocalFile STUB.
wfSuppressWarnings( $end=false)
Reference-counted warning suppression.
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.
getCommonMetaArray(File $image)
Get a file type independent array of metadata.
getMetadata( $image, $filename)
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
getMetadataType( $image)
Get a string describing the type of metadata, for display purposes.
wfDebug( $text, $dest='all')
Sends a line to the debug log if enabled or, optionally, to a comment in output.
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