[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Dump should allow getting elections by their ID
jenkins-bot has submitted this change and it was merged. ( 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(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified 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...] Options: -o 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: merged Gerrit-Change-Id: I5b13be15ebde7db44c6454e0af005784af5aa611 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SecurePoll Gerrit-Branch: master Gerrit-Owner: HujiGerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: Anomie Gerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Umherirrender Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Dump should allow getting elections by their ID
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...] Options: -o 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___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits