Skip to content

Commit e3fbe39

Browse files
committed
add EvalThemeRedirects maintenance script
1 parent 21e320d commit e3fbe39

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

maintenance/evalthemeredirects.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
/**
4+
* Runs evalTitle on all themedb redirects
5+
*
6+
* @file
7+
* @author Egor
8+
*/
9+
10+
require_once( dirname( __FILE__ ) . "/../../../maintenance/Maintenance.php" );
11+
12+
class TPCEvalThemeRedirects extends Maintenance {
13+
public function __construct() {
14+
parent::__construct();
15+
}
16+
17+
public function execute() {
18+
foreach ( TouhouThemeDB\Title::REDIRECTS as $k => $v ) {
19+
foreach ( Title::makeTitle( NS_THEMEDB, $v )->getSubPages() as $subpage ) {
20+
$this->output( $subpage->getPrefixedText() . "\n" );
21+
TouhouPatchCenter::evalTitle( $subpage );
22+
}
23+
}
24+
}
25+
}
26+
27+
$maintClass = 'TPCEvalThemeRedirects';
28+
require_once( RUN_MAINTENANCE_IF_MAIN );

0 commit comments

Comments
 (0)