jenkins-bot has submitted this change and it was merged.

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(-)

Approvals:
  Mattflaschen: Looks good to me, approved
  Matthias Mullie: Looks good to me, but someone else must approve
  jenkins-bot: Verified



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: merged
Gerrit-Change-Id: Ibfbd59914ea2026e1283d94dda40903d7c6de7fa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <[email protected]>
Gerrit-Reviewer: Mattflaschen <[email protected]>
Gerrit-Reviewer: Matthias Mullie <[email protected]>
Gerrit-Reviewer: Sbisson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to