Jalexander has uploaded a new change for review.
https://gerrit.wikimedia.org/r/111160
Change subject: Use RecentChanges::save to add RC rows
......................................................................
Use RecentChanges::save to add RC rows
Will send Flow actions to RC feeds and extensions like CheckUser
Bug: 60275
Change-Id: Ie248485ed28538e01e898afc62395ed9a2b8aed3
(cherry picked from commit 9b391165af9fb063713232f09d2785baaa8aa8c9)
---
M includes/Data/RecentChanges.php
1 file changed, 4 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow
refs/changes/60/111160/1
diff --git a/includes/Data/RecentChanges.php b/includes/Data/RecentChanges.php
index 5c43ee2..78f9a7b 100644
--- a/includes/Data/RecentChanges.php
+++ b/includes/Data/RecentChanges.php
@@ -7,6 +7,7 @@
use Flow\Model\Workflow;
use Flow\Repository\TreeRepository;
use Language;
+use RecentChange;
abstract class RecentChanges implements LifecycleHandler {
@@ -51,7 +52,6 @@
* @param Workflow $workflow
* @param $timestamp
* @param array $changes
- * @return bool
*/
protected function insert( $action, $block, $revisionType, $revisionId,
array $row, Workflow $workflow, $timestamp, array $changes ) {
if ( $timestamp instanceof UUID ) {
@@ -87,10 +87,11 @@
'rc_comment' => '',
'rc_timestamp' => $timestamp,
'rc_cur_time' => $timestamp,
+ 'rc_deleted' => 0,
);
- $dbw = wfGetDB( DB_MASTER );
- return $dbw->insert( 'recentchanges', $attribs, __METHOD__ );
+ $rc = RecentChange::newFromRow( (object)$attribs );
+ $rc->save(); // Insert into db and send to RC feeds
}
}
--
To view, visit https://gerrit.wikimedia.org/r/111160
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie248485ed28538e01e898afc62395ed9a2b8aed3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: wmf/1.23wmf11
Gerrit-Owner: Jalexander <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits