Changeset 3991 in subversion
- Timestamp:
- Sep 25, 2010 9:47:51 AM (3 years ago)
- Location:
- trunk/roundcubemail/program
- Files:
-
- 2 edited
-
include/rcube_shared.inc (modified) (2 diffs)
-
steps/mail/show.inc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/include/rcube_shared.inc
r3989 r3991 408 408 409 409 /** 410 * Replace the middle part of a string with ...411 * if it is longer than the allowed length410 * Truncate string if it is longer than the allowed length 411 * Replace the middle or the ending part of a string with a placeholder 412 412 * 413 413 * @param string Input string 414 414 * @param int Max. length 415 415 * @param string Replace removed chars with this 416 * @param bool Set to True if string should be truncated from the end 416 417 * @return string Abbreviated string 417 418 */ 418 function abbreviate_string($str, $maxlength, $place_holder='...' )419 function abbreviate_string($str, $maxlength, $place_holder='...', $ending=false) 419 420 { 420 421 $length = mb_strlen($str); … … 422 423 if ($length > $maxlength) 423 424 { 425 if ($ending) 426 return mb_substr($str, 0, $maxlength) . $place_holder; 427 424 428 $place_holder_length = mb_strlen($place_holder); 425 429 $first_part_length = floor(($maxlength - $place_holder_length)/2); -
trunk/roundcubemail/program/steps/mail/show.inc
r3989 r3991 42 42 $IMAP->set_charset($MESSAGE->headers->charset); 43 43 44 $OUTPUT->set_pagetitle( $MESSAGE->subject);44 $OUTPUT->set_pagetitle(abbreviate_string($MESSAGE->subject, 128, '...', true)); 45 45 46 46 // give message uid to the client
Note: See TracChangeset
for help on using the changeset viewer.
