Catrope has uploaded a new change for review.
https://gerrit.wikimedia.org/r/258069
Change subject: ApiFlowThank: Update for topic title changes in Flow
......................................................................
ApiFlowThank: Update for topic title changes in Flow
Bonus: render topic titles in notifications as plain text,
rather than trying to get wikitext.
Bug: T120934
Change-Id: Ibc1da789d11b80968dfb6e1f0d02589ff07981b9
(cherry picked from commit 034cee4f50f9fd70ac83206f2cc09382c475784b)
---
M ApiFlowThank.php
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Thanks
refs/changes/69/258069/1
diff --git a/ApiFlowThank.php b/ApiFlowThank.php
index 1fefc0e..22332af 100644
--- a/ApiFlowThank.php
+++ b/ApiFlowThank.php
@@ -10,6 +10,7 @@
*/
use Flow\Container;
+use Flow\Conversion\Utils;
use Flow\Data\RootPostLoader;
use Flow\Exception\FlowException;
use Flow\Model\PostRevision;
@@ -42,7 +43,7 @@
$rootPost = $data['root'];
$workflowId = $rootPost->getPostId();
- $rawTopicTitleText = Container::get( 'templating'
)->getContent( $rootPost, 'wikitext' );
+ $rawTopicTitleText = Utils::htmlToPlaintext( Container::get(
'templating' )->getContent( $rootPost, 'topic-title-html' ) );
// Truncate the title text to prevent issues with database
storage.
$topicTitleText = $this->getLanguage()->truncate(
$rawTopicTitleText, 200 );
$pageTitle = $this->getPageTitleFromRootPost( $rootPost );
--
To view, visit https://gerrit.wikimedia.org/r/258069
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibc1da789d11b80968dfb6e1f0d02589ff07981b9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Thanks
Gerrit-Branch: wmf/1.27.0-wmf.8
Gerrit-Owner: Catrope <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits