Skip to content

Commit

Permalink
Restore config page redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
alistair3149 committed Feb 28, 2025
1 parent e7445d5 commit 75d3cf7
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
1 change: 1 addition & 0 deletions WikibaseExport.alias.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@
/** English (English) */
$specialPageAliases['en'] = [
'WikibaseExport' => [ 'WikibaseExport' ],
'WikibaseExportConfig' => [ 'WikibaseExportConfig' ],
];
3 changes: 2 additions & 1 deletion extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
},

"SpecialPages": {
"WikibaseExport": "ProfessionalWiki\\WikibaseExport\\EntryPoints\\SpecialWikibaseExport"
"WikibaseExport": "ProfessionalWiki\\WikibaseExport\\EntryPoints\\SpecialWikibaseExport",
"WikibaseExportConfig": "ProfessionalWiki\\WikibaseExport\\EntryPoints\\SpecialWikibaseExportConfig"
},

"ResourceFileModulePaths": {
Expand Down
34 changes: 34 additions & 0 deletions src/EntryPoints/SpecialWikibaseExportConfig.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

declare( strict_types = 1 );

namespace ProfessionalWiki\WikibaseExport\EntryPoints;

use SpecialPage;
use Title;

class SpecialWikibaseExportConfig extends SpecialPage {

public function __construct() {
parent::__construct( 'WikibaseExportConfig' );
}

public function execute( $subPage ): void {
parent::execute( $subPage );

$title = Title::newFromText( 'MediaWiki:WikibaseExport' );

if ( $title instanceof Title ) {
$this->getOutput()->redirect( $title->getFullURL() );
}
}

public function getGroupName(): string {
return 'wikibase';
}

public function getDescription(): string {
return $this->msg( 'special-wikibase-export-config' )->escaped();
}

}

0 comments on commit 75d3cf7

Please sign in to comment.