Merge "(bug 51005) Add secondary link to the archive page"

This commit is contained in:
jenkins-bot 2013-07-30 08:54:44 +00:00 committed by Gerrit Code Review
commit 82e97088a1

View file

@ -426,18 +426,12 @@ class EchoBasicFormatter extends EchoNotificationFormatter {
*/
protected function formatFooter( $event, $user ) {
global $wgLang;
$timestamp = $this->formatTimestamp( $event->getTimestamp() );
$notificationFooterContent = array();
if ( $this->outputFormat === 'flyout' ) {
$secondaryLink = $this->getLink( $event, $user, 'secondary' );
if ( $secondaryLink ) {
$notificationFooterContent[] = $timestamp;
$notificationFooterContent[] = $secondaryLink;
$footer = $wgLang->pipeList( $notificationFooterContent );
}
}
if ( !$notificationFooterContent ) {
$footer = $timestamp;
// Default footer is timestamp
$footer = $this->formatTimestamp( $event->getTimestamp() );
$secondaryLink = $this->getLink( $event, $user, 'secondary' );
if ( $secondaryLink ) {
$footer = $wgLang->pipeList( array( $footer, $secondaryLink ) );
}
return Xml::tags( 'div', array( 'class' => 'mw-echo-notification-footer' ), $footer ) . "\n";
}