r72115 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72114‎ | r72115 | r72116 >
Date:16:45, 1 September 2010
Author:catrope
Status:deferred
Tags:
Comment:
resourceloader: Quick and dirty hack to fix infinite recursion
Modified paths:
  • /branches/resourceloader/phase3/includes/ResourceLoaderModule.php (modified) (history)

Diff [purge]

Index: branches/resourceloader/phase3/includes/ResourceLoaderModule.php
@@ -582,12 +582,21 @@
583583
584584
585585 class ResourceLoaderStartupModule extends ResourceLoaderModule {
 586+ private $modifiedTime = null;
 587+
586588 public function getScript( $lang, $skin, $debug ) {
587589 return ResourceLoader::getModuleRegistrations( $lang, $skin, $debug );
588590 }
589591
590592 public function getModifiedTime( $lang, $skin, $debug ) {
591 - return ResourceLoader::getHighestModifiedTime( $lang, $skin, $debug );
 593+ if ( !is_null( $this->modifiedTime ) ) {
 594+ return $this->modifiedTime;
 595+ }
 596+
 597+ // HACK getHighestModifiedTime() calls this function, so protect against infinite recursion
 598+ $this->modifiedTime = 1;
 599+ $this->modifiedTime = ResourceLoader::getHighestModifiedTime( $lang, $skin, $debug );
 600+ return $this->modifiedTime;
592601 }
593602
594603 public function getClientMaxage() {

Status & tagging log