mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RelatedArticles
synced 2024-11-24 00:05:50 +00:00
Remove unused ResourceLoaderMuHoganModule module
Followup from 191fc2a
Bug: T219846
Change-Id: Id5abee14f897204f072420cec2d6fdcf40cd37ff
This commit is contained in:
parent
a7e6c196f7
commit
fcfa09184d
|
@ -1,33 +0,0 @@
|
|||
<?php
|
||||
namespace RelatedArticles;
|
||||
|
||||
use ResourceLoaderFileModule;
|
||||
use ResourceLoaderContext;
|
||||
|
||||
/**
|
||||
* A ResourceLoader module that serves Hogan or Mustache depending on the
|
||||
* current target.
|
||||
*
|
||||
* FIXME: this is a copy&paste from the QuickSurveys extension. Find a way to
|
||||
* share the code or use mustache in MobileFrontend too.
|
||||
*/
|
||||
class ResourceLoaderMuHoganModule extends ResourceLoaderFileModule {
|
||||
|
||||
/**
|
||||
* Gets list of names of modules this module depends on.
|
||||
*
|
||||
* @param ResourceLoaderContext|null $context Resource loader context
|
||||
* @return array List of module names
|
||||
*/
|
||||
public function getDependencies( ResourceLoaderContext $context = null ) {
|
||||
$dependencies = parent::getDependencies( $context );
|
||||
|
||||
if ( $context && $context->getRequest()->getVal( 'target' ) === 'mobile' ) {
|
||||
$dependencies[] = 'mediawiki.template.hogan';
|
||||
} else {
|
||||
$dependencies[] = 'mediawiki.template.mustache';
|
||||
}
|
||||
|
||||
return $dependencies;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue