Catrope has uploaded a new change for review.

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

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
(cherry picked from commit 07c962e82fdeaac8c26c7ce098a3316d1842f1f5)
---
M Hooks.php
M includes/formatters/EditThresholdPresentationModel.php
2 files changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/16/276916/1

diff --git a/Hooks.php b/Hooks.php
index 4c19644..83be107 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/276916
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5d0fdfd3921427993211969eb5793f8e9e7667a8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: wmf/1.27.0-wmf.16
Gerrit-Owner: Catrope <[email protected]>
Gerrit-Reviewer: Mattflaschen <[email protected]>

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

Reply via email to