Go to the documentation of this file.
27 use Wikimedia\Timestamp\TimestampException;
65 $this->singleLang = $val;
87 return $obj->makeFormattedData( $tags );
102 $resolutionunit = !isset( $tags[
'ResolutionUnit'] ) || $tags[
'ResolutionUnit'] == 2 ? 2 : 3;
103 unset( $tags[
'ResolutionUnit'] );
105 foreach ( $tags
as $tag => &$vals ) {
108 if ( !is_array( $tags[
$tag] ) ) {
113 if ( isset( $tags[
$tag][
'_type'] ) ) {
115 unset( $vals[
'_type'] );
121 if (
$tag ==
'GPSTimeStamp' &&
count( $vals ) === 3 ) {
124 $h = explode(
'/', $vals[0] );
125 $m = explode(
'/', $vals[1] );
126 $s = explode(
'/', $vals[2] );
141 $tags[
$tag] = str_pad( intval( $h[0] / $h[1] ), 2,
'0', STR_PAD_LEFT )
142 .
':' . str_pad( intval( $m[0] / $m[1] ), 2,
'0', STR_PAD_LEFT )
143 .
':' . str_pad( intval(
$s[0] /
$s[1] ), 2,
'0', STR_PAD_LEFT );
151 }
catch ( TimestampException
$e ) {
162 if (
$tag ===
'Contact' ) {
167 foreach ( $vals
as &$val ) {
182 $val = $this->
exifMsg( $tag, $val );
190 case 'PhotometricInterpretation':
204 $val = $this->
exifMsg( $tag, $val );
222 $val = $this->
exifMsg( $tag, $val );
230 case 'PlanarConfiguration':
234 $val = $this->
exifMsg( $tag, $val );
243 case 'YCbCrPositioning':
247 $val = $this->
exifMsg( $tag, $val );
257 switch ( $resolutionunit ) {
272 case 'FlashpixVersion':
280 $val = $this->
exifMsg( $tag, $val );
288 case 'ComponentsConfiguration':
297 $val = $this->
exifMsg( $tag, $val );
306 case 'DateTimeOriginal':
307 case 'DateTimeDigitized':
308 case 'DateTimeReleased':
309 case 'DateTimeExpires':
312 case 'DateTimeMetadata':
313 if ( $val ==
'0000:00:00 00:00:00' || $val ==
' : : : : ' ) {
314 $val = $this->
msg(
'exif-unknowndate' )->text();
315 } elseif ( preg_match(
316 '/^(?:\d{4}):(?:\d\d):(?:\d\d) (?:\d\d):(?:\d\d):(?:\d\d)$/D',
324 } elseif ( preg_match(
'/^(?:\d{4}):(?:\d\d):(?:\d\d) (?:\d\d):(?:\d\d)$/D', $val ) ) {
332 } elseif ( preg_match(
'/^(?:\d{4}):(?:\d\d):(?:\d\d)$/D', $val ) ) {
335 . substr( $val, 5, 2 )
336 . substr( $val, 8, 2 )
345 case 'ExposureProgram':
356 $val = $this->
exifMsg( $tag, $val );
364 case 'SubjectDistance':
379 $val = $this->
exifMsg( $tag, $val );
410 $val = $this->
exifMsg( $tag, $val );
420 'fired' => $val & 0b00000001,
421 'return' => ( $val & 0b00000110 ) >> 1,
422 'mode' => ( $val & 0b00011000 ) >> 3,
423 'function' => ( $val & 0b00100000 ) >> 5,
424 'redeye' => ( $val & 0b01000000 ) >> 6,
428 # We do not need to handle unknown values since all are used.
429 foreach ( $flashDecode
as $subTag => $subValue ) {
430 # We do not need any message for zeroed values.
431 if ( $subTag !=
'fired' && $subValue == 0 ) {
434 $fullTag =
$tag .
'-' . $subTag;
435 $flashMsgs[] = $this->
exifMsg( $fullTag, $subValue );
437 $val = $this->
getLanguage()->commaList( $flashMsgs );
440 case 'FocalPlaneResolutionUnit':
443 $val = $this->
exifMsg( $tag, $val );
451 case 'SensingMethod':
460 $val = $this->
exifMsg( $tag, $val );
471 $val = $this->
exifMsg( $tag, $val );
482 $val = $this->
exifMsg( $tag, $val );
490 case 'CustomRendered':
494 $val = $this->
exifMsg( $tag, $val );
507 $val = $this->
exifMsg( $tag, $val );
519 $val = $this->
exifMsg( $tag, $val );
527 case 'SceneCaptureType':
533 $val = $this->
exifMsg( $tag, $val );
548 $val = $this->
exifMsg( $tag, $val );
561 $val = $this->
exifMsg( $tag, $val );
574 $val = $this->
exifMsg( $tag, $val );
587 $val = $this->
exifMsg( $tag, $val );
595 case 'SubjectDistanceRange':
601 $val = $this->
exifMsg( $tag, $val );
610 case 'GPSLatitudeRef':
611 case 'GPSDestLatitudeRef':
615 $val = $this->
exifMsg(
'GPSLatitude', $val );
623 case 'GPSLongitudeRef':
624 case 'GPSDestLongitudeRef':
628 $val = $this->
exifMsg(
'GPSLongitude', $val );
638 $val = $this->
exifMsg(
'GPSAltitude',
'below-sealevel', $this->
formatNum( -$val, 3 ) );
640 $val = $this->
exifMsg(
'GPSAltitude',
'above-sealevel', $this->
formatNum( $val, 3 ) );
648 $val = $this->
exifMsg( $tag, $val );
656 case 'GPSMeasureMode':
660 $val = $this->
exifMsg( $tag, $val );
669 case 'GPSImgDirectionRef':
670 case 'GPSDestBearingRef':
674 $val = $this->
exifMsg(
'GPSDirection', $val );
683 case 'GPSDestLatitude':
687 case 'GPSDestLongitude':
696 $val = $this->
exifMsg(
'GPSSpeed', $val );
704 case 'GPSDestDistanceRef':
709 $val = $this->
exifMsg(
'GPSDestDistance', $val );
721 } elseif ( $val <= 5 ) {
723 } elseif ( $val <= 10 ) {
725 } elseif ( $val <= 20 ) {
737 $val = $this->
exifMsg( $tag,
'', $val );
741 if ( is_array( $val ) ) {
743 $val = $this->
msg(
'exif-software-version-value', $val[0], $val[1] )->text();
745 $val = $this->
exifMsg( $tag,
'', $val );
751 $val = $this->
msg(
'exif-exposuretime-format',
754 case 'ISOSpeedRatings':
758 if ( $val ==
'65535' ) {
759 $val = $this->
exifMsg( $tag,
'overflow' );
765 $val = $this->
msg(
'exif-fnumber-format',
770 case 'FocalLengthIn35mmFilm':
771 $val = $this->
msg(
'exif-focallength-format',
775 case 'MaxApertureValue':
776 if ( strpos( $val,
'/' ) !==
false ) {
778 list( $n, $d ) = explode(
'/', $val );
779 if ( is_numeric( $n ) && is_numeric( $d ) ) {
783 if ( is_numeric( $val ) ) {
784 $fNumber = pow( 2, $val / 2 );
785 if ( $fNumber !==
false ) {
786 $val = $this->
msg(
'exif-maxaperturevalue-value',
795 switch ( strtolower( $val ) ) {
821 case 'SubjectNewsCode':
833 if ( $val == 0 || $val == 9 ) {
835 } elseif ( $val < 5 && $val > 1 ) {
837 } elseif ( $val == 5 ) {
839 } elseif ( $val <= 8 && $val > 5 ) {
843 if ( $urgency !==
'' ) {
844 $val = $this->
exifMsg(
'urgency',
851 case 'OriginalImageHeight':
852 case 'OriginalImageWidth':
853 case 'PixelXDimension':
854 case 'PixelYDimension':
857 $val = $this->
formatNum( $val ) .
' ' . $this->
msg(
'unit-pixel' )->text();
867 case 'ImageDescription':
871 case 'RelatedSoundFile':
872 case 'ImageUniqueID':
873 case 'SpectralSensitivity':
874 case 'GPSSatellites':
878 case 'WorldRegionDest':
880 case 'CountryCodeDest':
881 case 'ProvinceOrStateDest':
883 case 'SublocationDest':
884 case 'WorldRegionCreated':
885 case 'CountryCreated':
886 case 'CountryCodeCreated':
887 case 'ProvinceOrStateCreated':
889 case 'SublocationCreated':
891 case 'SpecialInstructions':
896 case 'FixtureIdentifier':
898 case 'LocationDestCode':
900 case 'JPEGFileComment':
901 case 'iimSupplementalCategory':
902 case 'OriginalTransmissionRef':
904 case 'dc-contributor':
913 case 'CameraOwnerName':
916 case 'RightsCertificate':
917 case 'CopyrightOwner':
920 case 'OriginalDocumentID':
922 case 'MorePermissionsUrl':
923 case 'AttributionUrl':
924 case 'PreferredAttributionName':
925 case 'PNGFileComment':
927 case 'ContentWarning':
928 case 'GIFFileComment':
930 case 'IntellectualGenre':
932 case 'OrginisationInImage':
933 case 'PersonInImage':
935 $val = htmlspecialchars( $val );
943 $val = $this->
exifMsg( $tag, $val );
946 $val = htmlspecialchars( $val );
954 $val = $this->
exifMsg( $tag, $val );
959 if ( $val ==
'-1' ) {
960 $val = $this->
exifMsg( $tag,
'rejected' );
969 $val = htmlspecialchars(
$lang );
971 $val = htmlspecialchars( $val );
1013 return $obj->flattenArrayReal( $vals,
$type, $noHtml );
1033 if ( !is_array( $vals ) ) {
1037 if ( isset( $vals[
'_type'] ) ) {
1038 $type = $vals[
'_type'];
1039 unset( $vals[
'_type'] );
1042 if ( !is_array( $vals ) ) {
1044 } elseif (
count( $vals ) === 1 &&
$type !==
'lang' ) {
1046 } elseif (
count( $vals ) === 0 ) {
1047 wfDebug( __METHOD__ .
" metadata array with 0 elements!\n" );
1066 $defaultItem =
false;
1067 $defaultLang =
false;
1076 if ( isset( $vals[
'x-default'] ) ) {
1077 $defaultItem = $vals[
'x-default'];
1078 unset( $vals[
'x-default'] );
1080 foreach ( $priorityLanguages
as $pLang ) {
1081 if ( isset( $vals[$pLang] ) ) {
1083 if ( $vals[$pLang] === $defaultItem ) {
1084 $defaultItem =
false;
1088 $vals[$pLang], $pLang,
1089 $isDefault, $noHtml );
1091 unset( $vals[$pLang] );
1093 if ( $this->singleLang ) {
1095 [
'lang' => $pLang ], $vals[$pLang] );
1101 foreach ( $vals
as $lang => $item ) {
1102 if ( $item === $defaultItem ) {
1103 $defaultLang =
$lang;
1107 $lang,
false, $noHtml );
1108 if ( $this->singleLang ) {
1110 [
'lang' =>
$lang ], $item );
1113 if ( $defaultItem !==
false ) {
1115 $defaultLang,
true, $noHtml ) .
1117 if ( $this->singleLang ) {
1118 return $defaultItem;
1125 return '<ul class="metadata-langlist">' .
1130 return "\n#" . implode(
"\n#", $vals );
1133 return "<ol><li>" . implode(
"</li>\n<li>", $vals ) .
'</li></ol>';
1137 return "\n*" . implode(
"\n*", $vals );
1140 return "<ul><li>" . implode(
"</li>\n<li>", $vals ) .
'</li></ul>';
1156 if (
$lang ===
false && $default ===
false ) {
1157 throw new MWException(
'$lang and $default cannot both '
1164 $wrappedValue =
'<span class="mw-metadata-lang-value">'
1168 if (
$lang ===
false ) {
1169 $msg = $this->
msg(
'metadata-langitem-default', $wrappedValue );
1171 return $msg->text() .
"\n\n";
1174 return '<li class="mw-metadata-lang-default">'
1179 $lowLang = strtolower(
$lang );
1181 if ( $langName ===
'' ) {
1183 list( $langPrefix ) = explode(
'-', $lowLang, 2 );
1185 if ( $langName ===
'' ) {
1192 $msg = $this->
msg(
'metadata-langitem', $wrappedValue, $langName,
$lang );
1194 return '*' . $msg->text();
1197 $item =
'<li class="mw-metadata-lang-code-'
1200 $item .=
' mw-metadata-lang-default';
1202 $item .=
'" lang="' .
$lang .
'">';
1203 $item .= $msg->text();
1221 if ( $val ===
'' ) {
1225 return $this->
msg( $wgContLang->lc(
"exif-$tag-$val" ), $arg, $arg2 )->
text();
1238 if ( is_array( $num ) ) {
1240 foreach ( $num
as $number ) {
1246 if ( preg_match(
'/^(-?\d+)\/(\d+)$/', $num, $m ) ) {
1248 $newNum = $m[1] / $m[2];
1249 if ( $round !==
false ) {
1250 $newNum = round( $newNum, $round );
1256 return $this->
getLanguage()->formatNum( $newNum );
1258 if ( is_numeric( $num ) && $round !==
false ) {
1259 $num = round( $num, $round );
1274 if ( preg_match(
'/^(-?\d+)\/(\d+)$/', $num, $m ) ) {
1275 $numerator = intval( $m[1] );
1276 $denominator = intval( $m[2] );
1277 $gcd = $this->
gcd( abs( $numerator ), $denominator );
1280 return $this->
formatNum( $numerator / $gcd ) .
'/' . $this->
formatNum( $denominator / $gcd );
1294 private function gcd( $a, $b ) {
1304 $remainder = $a % $b;
1327 if ( !preg_match(
'/^\d{8}$/D', $val ) ) {
1332 switch ( substr( $val, 0, 2 ) ) {
1385 if ( $cat !==
'' ) {
1386 $catMsg = $this->
exifMsg(
'iimcategory', $cat );
1387 $val = $this->
exifMsg(
'subjectnewscode',
'', $val, $catMsg );
1405 if (
$type ===
'latitude' ) {
1407 } elseif (
$type ===
'longitude' ) {
1412 if (
$type ===
'latitude' ) {
1414 } elseif (
$type ===
'longitude' ) {
1419 $deg = floor( $nCoord );
1420 $min = floor( ( $nCoord - $deg ) * 60.0 );
1421 $sec = round( ( ( $nCoord - $deg ) - $min / 60 ) * 3600, 2 );
1427 return $this->
msg(
'exif-coordinate-format', $deg, $min, $sec, $ref, $coord )->text();
1445 if ( !( isset( $vals[
'CiAdrExtadr'] )
1446 || isset( $vals[
'CiAdrCity'] )
1447 || isset( $vals[
'CiAdrCtry'] )
1448 || isset( $vals[
'CiEmailWork'] )
1449 || isset( $vals[
'CiTelWork'] )
1450 || isset( $vals[
'CiAdrPcode'] )
1451 || isset( $vals[
'CiAdrRegion'] )
1452 || isset( $vals[
'CiUrlWork'] )
1463 foreach ( $vals
as &$val ) {
1464 $val = htmlspecialchars( $val );
1472 $url = $tel = $street = $city = $country =
'';
1473 $email = $postal = $region =
'';
1482 if ( isset( $vals[
'CiAdrExtadr'] ) ) {
1485 $street =
'<span class="extended-address">'
1487 $vals[
'CiAdrExtadr'] )
1490 if ( isset( $vals[
'CiAdrCity'] ) ) {
1491 $city =
'<span class="locality">'
1492 . htmlspecialchars( $vals[
'CiAdrCity'] )
1495 if ( isset( $vals[
'CiAdrCtry'] ) ) {
1496 $country =
'<span class="country-name">'
1497 . htmlspecialchars( $vals[
'CiAdrCtry'] )
1500 if ( isset( $vals[
'CiEmailWork'] ) ) {
1503 $splitEmails = explode(
"\n", $vals[
'CiEmailWork'] );
1504 foreach ( $splitEmails
as $e1 ) {
1506 foreach ( explode(
',', $e1 )
as $e2 ) {
1507 $finalEmail = trim( $e2 );
1508 if ( $finalEmail ==
',' || $finalEmail ==
'' ) {
1511 if ( strpos( $finalEmail,
'<' ) !==
false ) {
1514 $emails[] = $finalEmail;
1516 $emails[] =
'[mailto:'
1518 .
' <span class="email">'
1524 $email = implode(
', ', $emails );
1526 if ( isset( $vals[
'CiTelWork'] ) ) {
1527 $tel =
'<span class="tel">'
1528 . htmlspecialchars( $vals[
'CiTelWork'] )
1531 if ( isset( $vals[
'CiAdrPcode'] ) ) {
1532 $postal =
'<span class="postal-code">'
1534 $vals[
'CiAdrPcode'] )
1537 if ( isset( $vals[
'CiAdrRegion'] ) ) {
1539 $region =
'<span class="region">'
1541 $vals[
'CiAdrRegion'] )
1544 if ( isset( $vals[
'CiUrlWork'] ) ) {
1545 $url =
'<span class="url">'
1546 . htmlspecialchars( $vals[
'CiUrlWork'] )
1550 return $this->
msg(
'exif-contact-value', $email, $url,
1551 $street, $city, $region, $postal, $country,
1567 if ( preg_match(
'/^\\*\s*(.*?)\s*$/',
$line,
$matches ) ) {
1571 $fields = array_map(
'strtolower', $fields );
1592 'getExtendedMetadata',
1594 (
int)$this->singleLang,
1598 $cachedValue =
$cache->get( $cacheKey );
1601 &&
Hooks::run(
'ValidateExtendedMetadataCache', [ $cachedValue[
'timestamp'], $file ] )
1603 $extendedMetadata = $cachedValue[
'data'];
1605 $maxCacheTime = ( $file instanceof
ForeignAPIFile ) ? 60 * 60 * 12 : 60 * 60 * 24 * 30;
1608 if ( $this->singleLang ) {
1617 $valueToCache = [
'data' => $extendedMetadata,
'timestamp' =>
wfTimestampNow() ];
1618 $cache->set( $cacheKey, $valueToCache, $maxCacheTime );
1621 return $extendedMetadata;
1639 return $file->getExtendedMetadata() ?: [];
1647 'value' => $uploadDate,
1648 'source' =>
'mediawiki-metadata',
1654 $text =
$title->getText();
1655 $pos = strrpos( $text,
'.' );
1658 $name = substr( $text, 0, $pos );
1663 $fileMetadata[
'ObjectName'] = [
1665 'source' =>
'mediawiki-metadata',
1669 return $fileMetadata;
1693 $visible = array_flip( self::getVisibleFields() );
1694 foreach ( $extendedMetadata
as $key =>
$value ) {
1695 if ( !isset( $visible[strtolower( $key )] ) ) {
1696 $extendedMetadata[$key][
'hidden'] =
'';
1700 return $extendedMetadata;
1714 || !isset(
$value[
'_type'] )
1715 ||
$value[
'_type'] !=
'lang'
1722 foreach ( $priorityLanguages
as $lang ) {
1729 if ( isset(
$value[
'x-default'] ) ) {
1730 return $value[
'x-default'];
1734 unset(
$value[
'_type'] );
1735 if ( !empty(
$value ) ) {
1753 if ( !is_array(
$value ) ) {
1755 } elseif ( isset(
$value[
'_type'] ) &&
$value[
'_type'] ===
'lang' ) {
1764 if ( $k ===
'_type' ) {
1778 if ( !is_array( $metadata ) ) {
1781 foreach ( $metadata
as &$field ) {
1782 if ( isset( $field[
'value'] ) ) {
1795 if ( !is_array( $metadata ) ) {
1798 foreach ( $metadata
as $key => &$field ) {
1799 if ( $key ===
'Software' || $key ===
'Contact' ) {
1804 if ( isset( $field[
'value'] ) ) {
1815 if ( !is_array( $arr ) ) {
1820 foreach ( $arr
as $key => &
$value ) {
1822 if ( $sanitizedKey !== $key ) {
1823 if ( isset( $arr[$sanitizedKey] ) ) {
1828 $sanitizedKey .= $counter;
1831 $arr[$sanitizedKey] = $arr[$key];
1832 unset( $arr[$key] );
1834 if ( is_array(
$value ) ) {
1840 $keys = array_filter( array_keys( $arr ),
'ApiResult::isMetadataKey' );
1856 $key = preg_replace(
'/[^a-zA-z0-9_:.-]/',
'', $key );
1858 $key = preg_replace(
'/^[\d-.]+/',
'', $key );
1865 if ( $key ==
'_element' ) {
1879 $priorityLanguages =
1881 $priorityLanguages = array_merge(
1883 $priorityLanguages[0],
1884 $priorityLanguages[1]
1887 return $priorityLanguages;
getContext()
Get the base IContextSource object.
msg()
Get a Message object with context set Parameters are the same as wfMessage()
if(!isset( $args[0])) $lang
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add text
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
getTimestamp()
Get the 14-character timestamp of the file upload.
getSha1()
Get the SHA-1 base 36 hash of the file.
as see the revision history and available at free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to use
Allows to change the fields on the form that will be generated $name
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 before the output is cached my talk my contributions etc etc otherwise the built in rate limiting checks are if enabled allows for interception of redirect as a string mapping parameter names to values & $type
isDeleted( $field)
Is this file a "deleted" file in a private archive? STUB.
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
getLanguage()
Get the Language object.
An IContextSource implementation which will inherit context from another source but allow individual ...
Implements some public methods and some protected utility functions which are required by multiple ch...
wfMemcKey()
Make a cache key for the local wiki.
namespace and then decline to actually register it file or subcat img or subcat $title
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist Do not use this to implement individual filters if they are compatible with the ChangesListFilter and ChangesListFilterGroup structure use sub classes of those in conjunction with the ChangesListSpecialPageStructuredFilters hook This hook can be used to implement filters that do not implement that or custom behavior that is not an individual filter e g Watchlist and Watchlist you will want to construct new ChangesListBooleanFilter or ChangesListStringOptionsFilter objects When constructing you specify which group they belong to You can reuse existing or create your you must register them with $special registerFilterGroup removed from all revisions and log entries to which it was applied This gives extensions a chance to take it off their books as the deletion has already been partly carried out by this point or something similar the user will be unable to create the tag set and then return false from the hook function Ensure you consume the ChangeTagAfterDelete hook to carry out custom deletion actions as context called by AbstractContent::getParserOutput May be used to override the normal model specific rendering of page content $content
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist Do not use this to implement individual filters if they are compatible with the ChangesListFilter and ChangesListFilterGroup structure use sub classes of those in conjunction with the ChangesListSpecialPageStructuredFilters hook This hook can be used to implement filters that do not implement that or custom behavior that is not an individual filter e g Watchlist and Watchlist you will want to construct new ChangesListBooleanFilter or ChangesListStringOptionsFilter objects When constructing you specify which group they belong to You can reuse existing or create your you must register them with $special registerFilterGroup removed from all revisions and log entries to which it was applied This gives extensions a chance to take it off their books $tag
The simplest way of implementing IContextSource is to hold a RequestContext as a member variable and ...
see documentation in includes Linker php for Linker::makeImageLink & $time
when a variable name is used in a it is silently declared as a new masking the global
wfTimestampNow()
Convenience function; returns MediaWiki timestamp for the present time.
wfDebug( $text, $dest='all', array $context=[])
Sends a line to the debug log if enabled or, optionally, to a comment in output.
setContext(IContextSource $context)
Set the IContextSource object.
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global list
div flags Integer display flags(NO_ACTION_LINK, NO_EXTRA_USER_LINKS) 'LogException' returning false will NOT prevent logging $e
static fetchLanguageName( $code, $inLanguage=null, $include='all')
getTitle()
Return the associated title object.
static setPreserveKeysList(array &$arr, $names)
Preserve specified keys.
static getMainWANInstance()
Get the main WAN cache object.
static getFallbacksIncludingSiteLanguage( $code)
Get the ordered list of fallback languages, ending with the fallback language chain for the site lang...
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
static rawElement( $element, $attribs=[], $contents='')
Returns an HTML element in a string.
either a unescaped string or a HtmlArmor object after in associative array form externallinks including delete and has completed for all link tables whether this was an auto creation 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 "<
Foreign file accessible through api.php requests.
static run( $event, array $args=[], $deprecatedVersion=null)
Call hook functions defined in Hooks::register and $wgHooks.
the array() calling protocol came about after MediaWiki 1.4rc1.
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 and the content language as $wgContLang
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that probably a stub it is not rendered in wiki pages or galleries in category pages allow injecting custom HTML after the section Any uses of the hook need to handle escaping see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array or by returning and letting standard HTTP rendering take place modifiable or by returning false and taking over the output $out