mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-12 09:26:05 +00:00
Make 'Edit threshhold' notif appear regardless of title existence
If a user recieves 'this is your X edit' they should get this notif regardless of whether the edit they created was deleted. We should make sure the title is there only for deciding whether or not to create a link for it; otherwise, the notification will just appear without a link to the revision. Change-Id: I00ed4278bb4e15b1e9ddfa2c3af8fad0540fc5f8
This commit is contained in:
parent
6d0583a772
commit
59c0ad6c4d
|
@ -11,13 +11,12 @@ class EchoEditThresholdPresentationModel extends EchoEventPresentationModel {
|
|||
}
|
||||
|
||||
public function getPrimaryLink() {
|
||||
if ( !$this->event->getTitle() ) {
|
||||
return false;
|
||||
}
|
||||
return array(
|
||||
'url' => $this->event->getTitle()->getLocalURL(),
|
||||
'label' => $this->msg( 'notification-link-thank-you-edit', $this->getViewingUserForGender() )->text()
|
||||
);
|
||||
}
|
||||
|
||||
public function canRender() {
|
||||
return $this->event->getTitle() !== null;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue