summaryrefslogtreecommitdiff
path: root/includes/resourceloader/ResourceLoaderFileModule.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/resourceloader/ResourceLoaderFileModule.php')
-rw-r--r--includes/resourceloader/ResourceLoaderFileModule.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/includes/resourceloader/ResourceLoaderFileModule.php b/includes/resourceloader/ResourceLoaderFileModule.php
index 3d657e1c..d0c56ae8 100644
--- a/includes/resourceloader/ResourceLoaderFileModule.php
+++ b/includes/resourceloader/ResourceLoaderFileModule.php
@@ -1,5 +1,7 @@
<?php
/**
+ * Resource loader module based on local JavaScript/CSS files.
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -109,6 +111,8 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
protected $position = 'bottom';
/** Boolean: Link to raw files in debug mode */
protected $debugRaw = true;
+ /** Boolean: Whether mw.loader.state() call should be omitted */
+ protected $raw = false;
/**
* Array: Cache for mtime
* @par Usage:
@@ -238,6 +242,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
break;
// Single booleans
case 'debugRaw':
+ case 'raw':
$this->{$member} = (bool) $option;
break;
}
@@ -366,6 +371,13 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
}
/**
+ * @return bool
+ */
+ public function isRaw() {
+ return $this->raw;
+ }
+
+ /**
* Get the last modified timestamp of this module.
*
* Last modified timestamps are calculated from the highest last modified
@@ -622,7 +634,8 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
// Get and register local file references
$this->localFileRefs = array_merge(
$this->localFileRefs,
- CSSMin::getLocalFileReferences( $style, $dir ) );
+ CSSMin::getLocalFileReferences( $style, $dir )
+ );
return CSSMin::remap(
$style, $dir, $remoteDir, true
);