From 07c962e82fdeaac8c26c7ce098a3316d1842f1f5 Mon Sep 17 00:00:00 2001 From: Matthew Flaschen Date: Fri, 11 Mar 2016 11:58:21 -0500 Subject: [PATCH] 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 --- Hooks.php | 2 +- includes/formatters/EditThresholdPresentationModel.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Hooks.php b/Hooks.php index 6fa90bead..4112c47c4 100644 --- a/Hooks.php +++ b/Hooks.php @@ -495,7 +495,7 @@ class EchoHooks { // 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 e92ecdcc8..7857e6852 100644 --- a/includes/formatters/EditThresholdPresentationModel.php +++ b/includes/formatters/EditThresholdPresentationModel.php @@ -16,4 +16,8 @@ class EchoEditThresholdPresentationModel extends EchoEventPresentationModel { 'label' => $this->msg( 'notification-link-thank-you-edit', $this->getViewingUserForGender() )->text() ); } + + public function canRender() { + return $this->event->getTitle() !== null; + } }