Mattflaschen has uploaded a new change for review.
https://gerrit.wikimedia.org/r/232576
Change subject: Cleanup debugging code for isTalkpageManagerUser
......................................................................
Cleanup debugging code for isTalkpageManagerUser
* Remove ArticleEditUpdateNewTalk debug code. It's unreachable
since the hook listener itself has a type-hint on user.
* Tweak BeforeEchoEventInsert. It is normal for it to be null for some
events, so handle that explicitly and don't treat it as a special
case.
* Remove the debug code for AbortEmailNotification, but keep the
return true. This should not really happen, but it doesn't hurt to
handle it.
Bug: T109063
Change-Id: Ibfbd59914ea2026e1283d94dda40903d7c6de7fa
---
M Hooks.php
1 file changed, 1 insertion(+), 8 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow
refs/changes/76/232576/1
diff --git a/Hooks.php b/Hooks.php
index a25781c..b3ccc53 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -911,7 +911,6 @@
}
if ( !$editor instanceof User ) {
- wfDebugLog( 'Flow', 'T109063: ' .
$title->getPrefixedDBkey() . ' ' . wfBacktrace( true ) );
return true;
}
@@ -931,8 +930,7 @@
public static function onBeforeEchoEventInsert( EchoEvent $event ) {
$agent = $event->getAgent();
- if ( !$agent instanceof User ) {
- wfDebugLog( 'Flow', 'T109063: ' . var_export( $event,
true ) . wfBacktrace( true ) );
+ if ( $agent === null ) {
return true;
}
@@ -953,11 +951,6 @@
*/
public static function onArticleEditUpdateNewTalk( WikiPage $page, User
$recipient ) {
$user = User::newFromId( $page->getUser( Revision::RAW ) );
-
- if ( !$user instanceof User ) {
- wfDebugLog( 'Flow', 'T109063: ' . wfBacktrace( true ) );
- return true;
- }
if ( self::isTalkpageManagerUser( $user ) ) {
return false;
--
To view, visit https://gerrit.wikimedia.org/r/232576
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibfbd59914ea2026e1283d94dda40903d7c6de7fa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits