summaryrefslogtreecommitdiff
path: root/includes/resourceloader/ResourceLoaderStartUpModule.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2011-12-03 09:20:55 +0100
committerPierre Schmitz <pierre@archlinux.de>2011-12-03 09:20:55 +0100
commita22fbfc60f36f5f7ee10d5ae6fe347340c2ee67c (patch)
tree31882fdc36540fecfd62e5011fc38515e504a3db /includes/resourceloader/ResourceLoaderStartUpModule.php
parent6ca0c5e0a943b64b4e3d0a11a80c5679f7252e64 (diff)
Update to MediaWiki 1.17.1
Diffstat (limited to 'includes/resourceloader/ResourceLoaderStartUpModule.php')
-rw-r--r--includes/resourceloader/ResourceLoaderStartUpModule.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/includes/resourceloader/ResourceLoaderStartUpModule.php b/includes/resourceloader/ResourceLoaderStartUpModule.php
index 2a3ba343..f3117378 100644
--- a/includes/resourceloader/ResourceLoaderStartUpModule.php
+++ b/includes/resourceloader/ResourceLoaderStartUpModule.php
@@ -119,7 +119,10 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
}
// Automatically register module
else {
- $mtime = max( $module->getModifiedTime( $context ), wfTimestamp( TS_UNIX, $wgCacheEpoch ) );
+ // getModifiedTime() is supposed to return a UNIX timestamp, but it doesn't always
+ // seem to do that, and custom implementations might forget. Coerce it to TS_UNIX
+ $moduleMtime = wfTimestamp( TS_UNIX, $module->getModifiedTime( $context ) );
+ $mtime = max( $moduleMtime, wfTimestamp( TS_UNIX, $wgCacheEpoch ) );
// Modules without dependencies or a group pass two arguments (name, timestamp) to
// mediaWiki.loader.register()
if ( !count( $module->getDependencies() && $module->getGroup() === null ) ) {