Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 10
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
ManageForeignResources
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 2
6
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 execute
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace MediaWiki\Extension\DiscussionTools\Maintenance;
4
5use ForeignResourceManager;
6use Maintenance;
7
8$IP = getenv( 'MW_INSTALL_PATH' );
9if ( $IP === false ) {
10    $IP = __DIR__ . '/../../..';
11}
12require_once "$IP/maintenance/Maintenance.php";
13
14class ManageForeignResources extends Maintenance {
15
16    public function __construct() {
17        parent::__construct();
18        $this->requireExtension( 'DiscussionTools' );
19    }
20
21    public function execute() {
22        $frm = new ForeignResourceManager(
23            __DIR__ . '/../modules/lib/foreign-resources.yaml',
24            __DIR__ . '/../modules/lib'
25        );
26        return $frm->run( 'update', 'all' );
27    }
28}
29
30$maintClass = ManageForeignResources::class;
31require_once RUN_MAINTENANCE_IF_MAIN;