summaryrefslogtreecommitdiff
path: root/extensions/SyntaxHighlight_GeSHi/ResourceLoaderGeSHiModule.php
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/SyntaxHighlight_GeSHi/ResourceLoaderGeSHiModule.php')
-rw-r--r--extensions/SyntaxHighlight_GeSHi/ResourceLoaderGeSHiModule.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/extensions/SyntaxHighlight_GeSHi/ResourceLoaderGeSHiModule.php b/extensions/SyntaxHighlight_GeSHi/ResourceLoaderGeSHiModule.php
index 63310c5b..98c1c1eb 100644
--- a/extensions/SyntaxHighlight_GeSHi/ResourceLoaderGeSHiModule.php
+++ b/extensions/SyntaxHighlight_GeSHi/ResourceLoaderGeSHiModule.php
@@ -51,11 +51,16 @@ class ResourceLoaderGeSHiModule extends ResourceLoaderModule {
* @return int
*/
public function getModifiedTime( ResourceLoaderContext $context ) {
+ static $selfmtime = null;
+ if ( $selfmtime === null ) {
+ // Cache this since there are 100s of instances of this module
+ // See also T93025, T85794.
+ $selfmtime = self::safeFilemtime( __FILE__ );
+ }
+
return max( array(
$this->getDefinitionMtime( $context ),
- self::safeFilemtime( __FILE__ ),
- self::safeFilemtime( __DIR__ . '/SyntaxHighlight_GeSHi.class.php' ),
- self::safeFilemtime( __DIR__ . '/geshi/geshi.php' ),
+ $selfmtime,
self::safeFilemtime( GESHI_LANG_ROOT . "/{$this->lang}.php" ),
) );
}
@@ -68,6 +73,7 @@ class ResourceLoaderGeSHiModule extends ResourceLoaderModule {
return array(
'class' => get_class( $this ),
'lang' => $this->lang,
+ 'geshi' => GESHI_VERSION,
);
}
}