Go to the documentation of this file.
36 # Origin is user-supplied code
84 if ( !
$title->isCssJsSubpage() && !
$title->isCssOrJsPage() ) {
95 wfDebugLog(
'resourceloader', __METHOD__ .
': failed to load content of JS/CSS page!' );
99 $model = $content->getModel();
102 wfDebugLog(
'resourceloader', __METHOD__ .
': bad content model $model for JS/CSS page!' );
106 return $content->getNativeData();
118 if (
$options[
'type'] !==
'script' ) {
126 if ( strval( $script ) !==
'' ) {
128 if ( strpos( $titleText,
'*/' ) ===
false ) {
129 $scripts .=
"/* $titleText */\n";
131 $scripts .= $script .
"\n";
146 if (
$options[
'type'] !==
'style' ) {
155 if ( strval( $style ) ===
'' ) {
158 if ( $this->
getFlip( $context ) ) {
161 $style =
CSSMin::remap( $style,
false, $wgScriptPath,
true );
162 if ( !isset( $styles[$media] ) ) {
163 $styles[$media] =
array();
165 if ( strpos( $titleText,
'*/' ) ===
false ) {
166 $style =
"/* $titleText */\n" . $style;
168 $styles[$media][] = $style;
180 if ( count( $mtimes ) ) {
181 $modifiedTime = max( $modifiedTime, max( $mtimes ) );
188 return $modifiedTime;
198 'class' => get_class( $this ),
199 'pages' => $this->
getPages( $context ),
225 if ( isset( $this->titleMtimes[
$hash] ) ) {
226 return $this->titleMtimes[
$hash];
235 if ( !
$batch->isEmpty() ) {
237 array(
'page_namespace',
'page_title',
'page_touched' ),
241 foreach (
$res as $row ) {
243 $this->titleMtimes[
$hash][
$title->getPrefixedDBkey()] =
247 return $this->titleMtimes[
$hash];
static & makeTitle( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
Object passed around to modules which contains information about the state of a specific loader reque...
static newFromText( $text, $defaultNamespace=NS_MAIN)
Create a new Title from text, such as what one would find in a link.
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
Class representing a list of titles The execute() method checks them all for existence and adds them ...
getDB()
Get the Database object used in getTitleMTimes().
const ORIGIN_USER_SITEWIDE
static remap( $source, $local, $remote, $embedData=true)
Remaps CSS URL paths and automatically embeds data URIs for CSS rules or url() values preceded by an ...
& wfGetDB( $db, $groups=array(), $wiki=false)
Get a Database object.
getStyles(ResourceLoaderContext $context)
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
getModifiedTime(ResourceLoaderContext $context)
wfDebugLog( $logGroup, $text, $dest='all')
Send a line to a supplementary debug log file, if configured, or main debug log if not.
Abstraction for resource loader modules which pull from wiki pages.
getScript(ResourceLoaderContext $context)
isKnownEmpty(ResourceLoaderContext $context)
getDefinitionMtime(ResourceLoaderContext $context)
Helper method for calculating when this module's definition summary was last changed.
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
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 & $options
static newFromTitle( $title, $id=0, $flags=0)
Load either the current, or a specified, revision that's attached to a given title.
presenting them properly to the user as errors is done by the caller $title
validateScriptFile( $fileName, $contents)
Validate a given script file; if valid returns the original source.
return false to override stock group addition can be modified try getUserPermissionsErrors userCan checks are continued by internal code can override on output return false to not delete it return false to override the default password checks & $hash
getMsgBlobMtime( $lang)
Get the last modification timestamp of the message blob for this module in a given language.
Abstraction for resource loader modules, with name registration and maxage functionality.
getTitleMtimes(ResourceLoaderContext $context)
Get the modification times of all titles that would be loaded for a given context.
const TS_UNIX
Unix time - the number of seconds since 1970-01-01 00:00:00 UTC.
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
getDefinitionSummary(ResourceLoaderContext $context)
Get the definition summary for this module.
getPages(ResourceLoaderContext $context)
Subclasses should return an associative array of resources in the module.
static transform( $css, $swapLtrRtlInURL=false, $swapLeftRightInURL=false)
Transform an LTR stylesheet to RTL.
const CONTENT_MODEL_JAVASCRIPT