http://www.mediawiki.org/wiki/Special:Code/MediaWiki/95975
Revision: 95975
Author: catrope
Date: 2011-09-01 13:02:20 +0000 (Thu, 01 Sep 2011)
Log Message:
-----------
Add ResourceLoaderContext::newDummyContext() function
Modified Paths:
--------------
trunk/phase3/includes/resourceloader/ResourceLoaderContext.php
Modified: trunk/phase3/includes/resourceloader/ResourceLoaderContext.php
===================================================================
--- trunk/phase3/includes/resourceloader/ResourceLoaderContext.php
2011-09-01 12:49:27 UTC (rev 95974)
+++ trunk/phase3/includes/resourceloader/ResourceLoaderContext.php
2011-09-01 13:02:20 UTC (rev 95975)
@@ -97,6 +97,13 @@
}
return $retval;
}
+
+ /**
+ * Return a dummy ResourceLoaderContext object suitable for passing
into things that don't "really" need a context
+ */
+ public static function newDummyContext() {
+ return new self( null, new FauxRequest( array() ) );
+ }
/**
* @return ResourceLoader
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs