mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-12-24 13:55:04 +00:00
86d47438d3
Consistent with core, most WMF extensions, and boilerplate as documented in extensions/README and elsewhere; as per T316722. Change-Id: I02cfcb2bd3debf877d1cbf8654dff4a98dd354ad
32 lines
699 B
PHP
32 lines
699 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Extension\DiscussionTools\Maintenance;
|
|
|
|
use ForeignResourceManager;
|
|
use Maintenance;
|
|
|
|
$IP = getenv( 'MW_INSTALL_PATH' );
|
|
if ( $IP === false ) {
|
|
$IP = __DIR__ . '/../../..';
|
|
}
|
|
require_once "$IP/maintenance/Maintenance.php";
|
|
|
|
class ManageForeignResources extends Maintenance {
|
|
|
|
public function __construct() {
|
|
parent::__construct();
|
|
$this->requireExtension( 'DiscussionTools' );
|
|
}
|
|
|
|
public function execute() {
|
|
$frm = new ForeignResourceManager(
|
|
__DIR__ . '/../modules/lib/foreign-resources.yaml',
|
|
__DIR__ . '/../modules/lib'
|
|
);
|
|
return $frm->run( 'update', 'all' );
|
|
}
|
|
}
|
|
|
|
$maintClass = ManageForeignResources::class;
|
|
require_once RUN_MAINTENANCE_IF_MAIN;
|