diff options
| author | roundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2005-10-16 19:12:24 +0000 |
|---|---|---|
| committer | roundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2005-10-16 19:12:24 +0000 |
| commit | 6d888fda942cbf15e615287dcadce07080bd08fe (patch) | |
| tree | e30f43ad340a65bc27614acf2ac3433a918e04fe /roundcubemail/program/include/rcube_shared.inc | |
| parent | 7979628549b9fbafcd4961f1e5f03db290f0eabd (diff) | |
Fixed folder display; added Portuguese and Catalan
git-svn-id: https://svn.roundcube.net/trunk@37 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_shared.inc')
| -rw-r--r-- | roundcubemail/program/include/rcube_shared.inc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/roundcubemail/program/include/rcube_shared.inc b/roundcubemail/program/include/rcube_shared.inc index 21c3ae8b4..693a2c860 100644 --- a/roundcubemail/program/include/rcube_shared.inc +++ b/roundcubemail/program/include/rcube_shared.inc @@ -1109,6 +1109,9 @@ function rcube_label($attrib) if ($text=='') $text = $a_text_item['single']; + // perform utf-8 decoding + //if (function_exists('utf8_decode')) + // $text = utf8_decode($text); // replace vars in text if (is_array($attrib['vars'])) @@ -1414,4 +1417,20 @@ function make_absolute_url($path, $base_url) +function abbrevate_string($str, $maxlength, $place_holder='...') + { + $length = strlen($str); + $first_part_length = floor($maxlength/2) - strlen($place_holder); + + if ($length > $maxlength) + { + $second_starting_location = $length - $maxlength + $first_part_length + 1; + $str = substr($str, 0, $first_part_length) . $place_holder . substr($str, $second_starting_location, $length); + } + + return $str; + } + + + ?>
\ No newline at end of file |
