diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2006-07-18 21:02:43 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2006-07-18 21:02:43 +0000 |
| commit | b3c55ab38c4b9115d38c026520ddf624de6a1438 (patch) | |
| tree | f1732b0e11c670fff862316520696af65dfa64e4 /roundcubemail/program/include/rcube_shared.inc | |
| parent | e7c5d0833688fef95b944a103a1f14aaca8777c0 (diff) | |
Fixed bugs #1364122, #1468895, ticket #1483811 and other minor bugs
git-svn-id: https://svn.roundcube.net/trunk@275 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_shared.inc')
| -rw-r--r-- | roundcubemail/program/include/rcube_shared.inc | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/roundcubemail/program/include/rcube_shared.inc b/roundcubemail/program/include/rcube_shared.inc index fe1a560a3..8f4efdb07 100644 --- a/roundcubemail/program/include/rcube_shared.inc +++ b/roundcubemail/program/include/rcube_shared.inc @@ -1334,7 +1334,8 @@ function make_absolute_url($path, $base_url) } - +// replace the middle part of a string with ... +// if it is longer than the allowed length function abbrevate_string($str, $maxlength, $place_holder='...') { $length = strlen($str); @@ -1350,6 +1351,20 @@ function abbrevate_string($str, $maxlength, $place_holder='...') } +// make sure the string ends with a slash +function slashify($str) + { + return unslashify($str).'/'; + } + + +// remove slash at the end of the string +function unslashify($str) + { + return preg_replace('/\/$/', '', $str); + } + + // delete all files within a folder function clear_directory($dir_path) { |
