mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-28 01:30:15 +00:00
59c0ad6c4d
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
23 lines
561 B
PHP
23 lines
561 B
PHP
<?php
|
|
|
|
class EchoEditThresholdPresentationModel extends EchoEventPresentationModel {
|
|
|
|
public function getIconType() {
|
|
return 'edit';
|
|
}
|
|
|
|
public function getHeaderMessageKey() {
|
|
return 'notification-header-thank-you-' . $this->event->getExtraParam( 'editCount' ) . '-edit';
|
|
}
|
|
|
|
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()
|
|
);
|
|
}
|
|
}
|