Huji has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/377373 )
Change subject: Dump should allow getting elections by their ID ...................................................................... Dump should allow getting elections by their ID Bug: T175652 Change-Id: I5b13be15ebde7db44c6454e0af005784af5aa611 --- M cli/dump.php 1 file changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SecurePoll refs/changes/73/377373/1 diff --git a/cli/dump.php b/cli/dump.php index 8521b5f..45a8399 100644 --- a/cli/dump.php +++ b/cli/dump.php @@ -11,6 +11,7 @@ Usage: php dump.php [options...] <election name> Options: -o <outfile> Output to the specified file + --by-id Get election using its numerical ID, instead of its title --votes Include vote records --all-langs Include messages for all languages instead of just the primary --jump Produce a configuration dump suitable for setting up a jump wiki @@ -21,7 +22,12 @@ } $context = new SecurePoll_Context; -$election = $context->getElectionByTitle( $args[0] ); +if ( isset( $options['by-id'] ) ) { + $election = $context->getElection( $args[0] ); +} else { + $election = $context->getElectionByTitle( $args[0] ); +} + if ( !$election ) { spFatal( "There is no election called \"$args[0]\"" ); } -- To view, visit https://gerrit.wikimedia.org/r/377373 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5b13be15ebde7db44c6454e0af005784af5aa611 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SecurePoll Gerrit-Branch: master Gerrit-Owner: Huji <huji.h...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits