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

Change subject: thank-you-edit: canRender for deleted page and extra fix
......................................................................


thank-you-edit: canRender for deleted page and extra fix

Don't try to render if page was deleted, and fix 'extra' parameter
(was breaking message key and thus rendering)

Bug: T129641
Change-Id: I5d0fdfd3921427993211969eb5793f8e9e7667a8
---
M Hooks.php
M includes/formatters/EditThresholdPresentationModel.php
2 files changed, 5 insertions(+), 1 deletion(-)

Approvals:
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Hooks.php b/Hooks.php
index 6fa90be..4112c47 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -495,7 +495,7 @@
                                                        // Edit threshold 
notifications are sent to the agent
                                                        'extra' => array(
                                                                'notifyAgent' 
=> true,
-                                                               
'thresholdCount' => $thresholdCount,
+                                                               'editCount' => 
$thresholdCount,
                                                        )
                                                )
                                        );
diff --git a/includes/formatters/EditThresholdPresentationModel.php 
b/includes/formatters/EditThresholdPresentationModel.php
index e92ecdc..7857e68 100644
--- a/includes/formatters/EditThresholdPresentationModel.php
+++ b/includes/formatters/EditThresholdPresentationModel.php
@@ -16,4 +16,8 @@
                        'label' => $this->msg( 
'notification-link-thank-you-edit', $this->getViewingUserForGender() )->text()
                );
        }
+
+       public function canRender() {
+               return $this->event->getTitle() !== null;
+       }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5d0fdfd3921427993211969eb5793f8e9e7667a8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to