mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-23 16:06:53 +00:00
Merge "Handle hidden revision in more places"
This commit is contained in:
commit
98e1b4a34d
|
@ -48,4 +48,18 @@ class PlaintextEchoPresentationModelSection extends EchoPresentationModelSection
|
|||
}
|
||||
return $title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get truncated section title, according to user's language
|
||||
* or a placeholder text if the section title is not available.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTruncatedSectionTitle() {
|
||||
if ( $this->exists() ) {
|
||||
return parent::getTruncatedSectionTitle();
|
||||
}
|
||||
|
||||
return wfMessage( 'discussiontools-notification-topic-hidden' )->inLanguage( $this->language )->text();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -90,15 +90,11 @@ class SubscribedNewCommentPresentationModel extends EchoEventPresentationModel {
|
|||
$msg = $this->msg( $this->getHeaderMessageKey() );
|
||||
// Repeat is B/C until unused parameter is removed from translations
|
||||
$msg->numParams( $count, $count );
|
||||
$msg->plaintextParams( $this->section->getTruncatedSectionTitle() );
|
||||
} else {
|
||||
$msg = parent::getHeaderMessage();
|
||||
$msg->params( $this->getTruncatedTitleText( $this->event->getTitle(), true ) );
|
||||
}
|
||||
|
||||
if ( $this->section->exists() ) {
|
||||
$msg->plaintextParams( $this->section->getTruncatedSectionTitle() );
|
||||
} else {
|
||||
$msg->plaintextParams( $this->msg( 'discussiontools-notification-topic-hidden' )->text() );
|
||||
}
|
||||
|
||||
return $msg;
|
||||
|
|
Loading…
Reference in a new issue