Page MenuHomeMiraheze
Paste P347

pagetriage*wikibaserepository*'
ActivePublic

Authored by Paladox on Oct 13 2020, 22:24.
Tags
None
Referenced Files
F1326759: pagetriage*wikibaserepository*'
Oct 31 2020, 12:38
F1323485: pagetriage*wikibaserepository*'
Oct 28 2020, 02:03
F1323463: pagetriage*wikibaserepository*'
Oct 28 2020, 01:43
F1312830: pagetriage*wikibaserepository*'
Oct 13 2020, 23:01
F1312829: pagetriage*wikibaserepository*'
Oct 13 2020, 22:55
F1312828: pagetriage*wikibaserepository*'
Oct 13 2020, 22:53
F1312815: raw-paste-data.txt
Oct 13 2020, 22:26
F1312814: raw-paste-data.txt
Oct 13 2020, 22:24
Subscribers
None
<?php
require_once '/srv/mediawiki/w/maintenance/Maintenance.php';
class runSchema extends Maintenance {
public function __construct() {
parent::__construct();
}
public function execute() {
global $wgCreateWikiDatabase;
$lists = [];
$extArray = [ 'babel', 'pagetriage', 'wikibaserepository' ];
$dbw = wfGetDB( DB_MASTER, [], $wgCreateWikiDatabase );
foreach( $extArray as $ext ) {
$mwSettings = $dbw->select(
'mw_settings',
's_dbname',
[
's_extensions' . $dbw->buildLike( $dbw->anyString(), "$ext", $dbw->anyString() )
],
__METHOD__,
);
foreach ( $mwSettings as $wiki ) {
$lists[$ext][$wiki->s_dbname] = [];
}
}
foreach ( $extArray as $ext ) {
file_put_contents( "/home/paladox/$ext.json", json_encode( [ 'combi' => $lists[$ext] ] ), LOCK_EX );
}
}
}
$maintClass = 'runSchema';
require_once RUN_MAINTENANCE_IF_MAIN;

Event Timeline

Paladox changed the title of this paste from untitled to pagetriage*wikibaserepository*'.Oct 13 2020, 22:53
Paladox edited the content of this paste. (Show Details)
Paladox edited the content of this paste. (Show Details)