Anomie has uploaded a new change for review.
https://gerrit.wikimedia.org/r/174898
Change subject: Fix translate log saving
......................................................................
Fix translate log saving
We need to reload the election from the database before getting a
Content from it, or else we save the pre-edit data.
Change-Id: Ife263b0cb1969aebd72bb2416b1fede4c2c8c9f2
---
M includes/pages/TranslatePage.php
1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SecurePoll
refs/changes/98/174898/1
diff --git a/includes/pages/TranslatePage.php b/includes/pages/TranslatePage.php
index 1b13238..e92fe7c 100644
--- a/includes/pages/TranslatePage.php
+++ b/includes/pages/TranslatePage.php
@@ -188,8 +188,12 @@
);
if ( $wgSecurePollUseNamespace ) {
+ // Create a new context to bypass caching
+ $context = new SecurePoll_Context;
+ $election = $context->getElection(
$this->election->getId() );
+
list( $title, $content ) =
SecurePollContentHandler::makeContentFromElection(
- $this->election, "msg/$secondary" );
+ $election, "msg/$secondary" );
$wp = WikiPage::factory( $title );
$wp->doEditContent( $content,
$wgRequest->getText( 'comment' ) );
}
--
To view, visit https://gerrit.wikimedia.org/r/174898
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife263b0cb1969aebd72bb2416b1fede4c2c8c9f2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SecurePoll
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits