Changeset 1026 in subversion


Ignore:
Timestamp:
Feb 7, 2008 2:50:37 AM (5 years ago)
Author:
thomasb
Message:

Truncate attachment filenames to 55 characters (#1484757) and fix misspelled function name

Location:
trunk/roundcubemail/program
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/include/main.inc

    r1014 r1026  
    17131713      if ($maxlength && $maxlength>1) 
    17141714        { 
    1715         $fname = abbrevate_string($foldername, $maxlength); 
     1715        $fname = abbreviate_string($foldername, $maxlength); 
    17161716        if ($fname != $foldername) 
    17171717          $title = ' title="'.Q($foldername).'"'; 
     
    17921792      // shorten the folder name to a given length 
    17931793      if ($maxlength && $maxlength>1) 
    1794         $foldername = abbrevate_string($foldername, $maxlength); 
     1794        $foldername = abbreviate_string($foldername, $maxlength); 
    17951795      } 
    17961796 
  • trunk/roundcubemail/program/include/rcube_shared.inc

    r839 r1026  
    558558 * @param int    Max. length 
    559559 * @param string Replace removed chars with this 
    560  * @return string Abbrevated string 
    561  */ 
    562 function abbrevate_string($str, $maxlength, $place_holder='...') 
     560 * @return string Abbreviated string 
     561 */ 
     562function abbreviate_string($str, $maxlength, $place_holder='...') 
    563563{ 
    564564  $length = rc_strlen($str); 
  • trunk/roundcubemail/program/steps/mail/get.inc

    r930 r1026  
    109109      header(sprintf('Content-Disposition: %s; filename="%s";', 
    110110                     $_GET['_download'] ? 'attachment' : 'inline', 
    111                      $part->filename ? $part->filename : "roundcube.$ctype_secondary")); 
     111                     $part->filename ? abbreviate_string($part->filename, 55) : "roundcube.$ctype_secondary")); 
    112112 
    113113      // turn off output buffering and print part content 
Note: See TracChangeset for help on using the changeset viewer.