AndyRussG has uploaded a new change for review.
https://gerrit.wikimedia.org/r/202925
Change subject: WIP Send RL context to getDependencies
......................................................................
WIP Send RL context to getDependencies
This could be used by a CentralNotice feature that determines dependencies
dynamically sever-side. Buahahahaha.
Change-Id: Iee61e5b527321d01287baa03ad9b4d4f526ff3ef
---
M includes/resourceloader/ResourceLoaderModule.php
M includes/resourceloader/ResourceLoaderStartUpModule.php
2 files changed, 4 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/25/202925/1
diff --git a/includes/resourceloader/ResourceLoaderModule.php
b/includes/resourceloader/ResourceLoaderModule.php
index ed16521..5f84efd 100644
--- a/includes/resourceloader/ResourceLoaderModule.php
+++ b/includes/resourceloader/ResourceLoaderModule.php
@@ -313,9 +313,11 @@
*
* To add dependencies dynamically on the client side, use a custom
* loader script, see getLoaderScript()
+ *
+ * @param ResourceLoaderContext $context
* @return array List of module names as strings
*/
- public function getDependencies() {
+ public function getDependencies( $context=null ) {
// Stub, override expected
return array();
}
diff --git a/includes/resourceloader/ResourceLoaderStartUpModule.php
b/includes/resourceloader/ResourceLoaderStartUpModule.php
index 48b3576..3f61b3c 100644
--- a/includes/resourceloader/ResourceLoaderStartUpModule.php
+++ b/includes/resourceloader/ResourceLoaderStartUpModule.php
@@ -233,7 +233,7 @@
$registryData[$name] = array(
// Convert to numbers as wfTimestamp always
returns a string, even for TS_UNIX
'version' => (int) $mtime,
- 'dependencies' => $module->getDependencies(),
+ 'dependencies' => $module->getDependencies(
$context ),
'group' => $module->getGroup(),
'source' => $module->getSource(),
'loader' => $module->getLoaderScript(),
--
To view, visit https://gerrit.wikimedia.org/r/202925
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iee61e5b527321d01287baa03ad9b4d4f526ff3ef
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: AndyRussG <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits