EBernhardson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/92427


Change subject: Show flow events in watchlist
......................................................................

Show flow events in watchlist

Flow events were not showing up in the watchlist due to the need to adjust a 
query
issued by Special:Watchlist.  A new hook to effect this change has been merged 
to
master and this updates Flow to utilize it (and hence, enable watchlists).

Bug: 55597
Change-Id: I2ca72fac0153f046b2cb0f94dbc55f2fff3adf7c
---
M Flow.php
M Hooks.php
M includes/Data/RecentChanges.php
3 files changed, 10 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/27/92427/1

diff --git a/Flow.php b/Flow.php
index eab4dbe..897fb84 100755
--- a/Flow.php
+++ b/Flow.php
@@ -152,6 +152,7 @@
 $wgHooks['UserGetReservedNames'][] = 'FlowHooks::onUserGetReservedNames';
 $wgHooks['TitleIsAlwaysKnown'][] = 'FlowHooks::onTitleIsAlwaysKnown';
 $wgHooks['SkinTemplateNavigation::Universal'][] = 
'FlowHooks::onSkinTemplateNavigation';
+$wgHooks['SpecialWatchlistGetNonRevisionTypes'][] = 
'FlowHooks::onSpecialWatchlistGetNonRevisionTypes';
 
 // Extension initialization
 $wgExtensionFunctions[] = 'FlowHooks::initFlowExtension';
diff --git a/Hooks.php b/Hooks.php
index 513c452..d5ffe6b 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -217,4 +217,9 @@
                $names[] = 'msg:flow-user-anonymous';
                return true;
        }
+
+       public static function onSpecialWatchlistGetNonRevisionTypes( &$types ) 
{
+               $types[] = RC_FLOW;
+               return true;
+       }
 }
diff --git a/includes/Data/RecentChanges.php b/includes/Data/RecentChanges.php
index 2effd74..8b62cef 100644
--- a/includes/Data/RecentChanges.php
+++ b/includes/Data/RecentChanges.php
@@ -10,6 +10,9 @@
 
 abstract class RecentChanges implements LifecycleHandler {
 
+       // Value used in rc_source field of recentchanges to identify flow 
specific changes
+       const SRC_FLOW = "flow";
+
        // Maximum length any user generated content is truncated to before 
storing
        // in recentchanges
        const TRUNCATE_LENGTH = 164;
@@ -44,7 +47,7 @@
                        'rc_user' => $row['rev_user_id'],
                        'rc_user_text' => $row['rev_user_text'],
                        'rc_type' => RC_FLOW,
-                       // 'rc_source' => RC_SRC_FLOW, // depends on core 
change in gerrit 85787
+                       'rc_source' => self::SRC_FLOW,
                        'rc_minor' => 0,
                        'rc_bot' => 0, // TODO: is revision by bot
                        'rc_patrolled' => 0,

-- 
To view, visit https://gerrit.wikimedia.org/r/92427
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2ca72fac0153f046b2cb0f94dbc55f2fff3adf7c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to