Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/259198
Change subject: Add option to export specific site definition ...................................................................... Add option to export specific site definition in exportSites.php maintenance script. Change-Id: I7461fea704d300c54605a7490cfbe173df91e3e3 --- M maintenance/exportSites.php 1 file changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/98/259198/1 diff --git a/maintenance/exportSites.php b/maintenance/exportSites.php index 145c924..662c951 100644 --- a/maintenance/exportSites.php +++ b/maintenance/exportSites.php @@ -17,6 +17,7 @@ public function __construct() { $this->mDescription = 'Exports site definitions the sites table to XML file'; + $this->addOption( 'site', 'Site to export', false, true ); $this->addArg( 'file', 'A file to write the XML to (see docs/sitelist.txt). ' . 'Use "php://stdout" to write to stdout.', true ); @@ -43,6 +44,16 @@ $exporter = new SiteExporter( $handle ); $sites = SiteSQLStore::newInstance()->getSites( 'recache' ); + $site = $this->getOption( 'site', null ); + + if ( is_string( $site ) ) { + $site = $sites->getSite( $site ); + + if ( $site ) { + $sites = new SiteList( array( $site ) ); + } + } + $exporter->exportSites( $sites ); fclose( $handle ); -- To view, visit https://gerrit.wikimedia.org/r/259198 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7461fea704d300c54605a7490cfbe173df91e3e3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aude <aude.w...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits