Page MenuHomeWickedGov Phorge

getCentralAuthDBInfo.php
No OneTemporary

Size
798 B
Referenced Files
None
Subscribers
None

getCentralAuthDBInfo.php

<?php
namespace MediaWiki\Extension\CentralAuth\Maintenance;
$IP = getenv( 'MW_INSTALL_PATH' );
if ( $IP === false ) {
$IP = __DIR__ . '/../../..';
}
require_once "$IP/maintenance/Maintenance.php";
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" );
}
}
$maintClass = GetCentralAuthDBInfo::class;
require_once RUN_MAINTENANCE_IF_MAIN;

File Metadata

Mime Type
text/x-php
Expires
Sat, Oct 3, 11:53 (4 d, 11 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
fb/11/dd88572617291b4d80070fbaab87
Default Alt Text
getCentralAuthDBInfo.php (798 B)

Event Timeline