Page MenuHomeWickedGov Phorge

getCentralAuthDBInfo.php
No OneTemporary

Size
906 B
Referenced Files
None
Subscribers
None

getCentralAuthDBInfo.php

<?php
namespace MediaWiki\Extension\CentralAuth\Maintenance;
// @codeCoverageIgnoreStart
$IP = getenv( 'MW_INSTALL_PATH' );
if ( $IP === false ) {
$IP = __DIR__ . '/../../..';
}
require_once "$IP/maintenance/Maintenance.php";
// @codeCoverageIgnoreEnd
use MediaWiki\Extension\CentralAuth\CentralAuthServices;
use MediaWiki\Maintenance\Maintenance;
class GetCentralAuthDBInfo extends Maintenance {
public function __construct() {
parent::__construct();
$this->requireExtension( 'CentralAuth' );
$this->addDescription( 'Display info for replica server hosting the CentralAuth database' );
}
public function execute() {
$db = CentralAuthServices::getDatabaseManager()->getCentralReplicaDB();
$host = $db->getServer();
$this->output( "$host\n" );
}
}
// @codeCoverageIgnoreStart
$maintClass = GetCentralAuthDBInfo::class;
require_once RUN_MAINTENANCE_IF_MAIN;
// @codeCoverageIgnoreEnd

File Metadata

Mime Type
text/x-php
Expires
Mon, Nov 23, 21:38 (6 d, 10 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
e2/c2/8da22935ed09a1d15e807a2fc288
Default Alt Text
getCentralAuthDBInfo.php (906 B)

Event Timeline