Kaldari has uploaded a new change for review.
https://gerrit.wikimedia.org/r/192725
Change subject: Add Flow support to WikiLove
......................................................................
Add Flow support to WikiLove
Change-Id: I66fcea185f0852e8eee466465e01cf410d30f133
---
M ApiWikiLove.php
1 file changed, 13 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiLove
refs/changes/25/192725/1
diff --git a/ApiWikiLove.php b/ApiWikiLove.php
index 90de5cd..917955d 100644
--- a/ApiWikiLove.php
+++ b/ApiWikiLove.php
@@ -23,9 +23,11 @@
$this->saveInDb( $talk, $params['subject'],
$params['message'], $params['type'], isset( $params['email'] ) ? 1 : 0 );
}
- // If LQT is installed and enabled, use it.
+ // Create edit summary
$summary = $this->msg( 'wikilove-summary', $strippedSubject
)->inContentLanguage()
->text();
+
+ // If LQT is installed and enabled, use it.
if ( class_exists( 'LqtDispatch' ) && LqtDispatch::isLqtPage(
$talk ) ) {
$apiParamArray = array(
'action' => 'threadaction',
@@ -36,6 +38,16 @@
'text' => $params['text'],
'token' => $params['token']
);
+ // If Flow is installed and enabled, use it.
+ } else if ( class_exists( 'ApiFlow' ) &&
$talk->getContentModel() === CONTENT_MODEL_FLOW_BOARD ) {
+ $apiParamArray = array(
+ 'action' => 'flow',
+ 'submodule' => 'new-topic',
+ 'page' => $talk->getFullText(),
+ 'nttopic' => $params['subject'],
+ 'ntcontent' => $params['text'],
+ 'token' => $params['token']
+ );
} else {
// Requires MediaWiki 1.19 or later
$apiParamArray = array(
--
To view, visit https://gerrit.wikimedia.org/r/192725
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I66fcea185f0852e8eee466465e01cf410d30f133
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiLove
Gerrit-Branch: master
Gerrit-Owner: Kaldari <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits