Skip to content
This repository has been archived by the owner on Jul 5, 2018. It is now read-only.

Commit

Permalink
Truncate subject / recipients to 36 chars + add Full value in title
Browse files Browse the repository at this point in the history
  • Loading branch information
francoisjacquet committed Mar 3, 2016
1 parent 9b7d2eb commit dda16ac
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Messaging/includes/Messages.fnc.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,10 @@ function _makeMessageFromHeader( $value, $column )

function _makeMessageRecipients( $value, $column )
{
// Truncate value to 40 chars.
return mb_strlen( $value ) <= 40 ? $value : mb_substr( $value, 0, 37 ) . '...';
// Truncate value to 36 chars.
return mb_strlen( $value ) <= 36 ?
$value :
'<span title="' . $value . '">' . mb_substr( $value, 0, 33 ) . '...</span>';
}


Expand Down Expand Up @@ -209,8 +211,10 @@ function _makeMessageSubject( $value, $column )
$extra = ' style="font-weight:bold;"';
}

// Truncate value to 40 chars.
$subject = mb_strlen( $value ) <= 40 ? $value : mb_substr( $value, 0, 37 ) . '...';
// Truncate value to 36 chars.
$subject = mb_strlen( $value ) <= 36 ?
$value :
'<span title="' . $value . '">' . mb_substr( $value, 0, 33 ) . '...</span>';

return '<a href="' . $view_message_link . '"' . $extra . '>' .
$subject . '</a>';
Expand Down

0 comments on commit dda16ac

Please sign in to comment.