summaryrefslogtreecommitdiff
path: root/program/include/rcube_shared.inc
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2006-07-18 21:02:43 +0000
committerthomascube <thomas@roundcube.net>2006-07-18 21:02:43 +0000
commitbac7d1742d45f256ded98656482ec9995e1c330a (patch)
treee94566db48903c963b4bb5f9d1b27de632d49e91 /program/include/rcube_shared.inc
parent321302e52788e79c3548adde8d66f8ad426c9591 (diff)
Fixed bugs #1364122, #1468895, ticket #1483811 and other minor bugs
Diffstat (limited to 'program/include/rcube_shared.inc')
-rw-r--r--program/include/rcube_shared.inc17
1 files changed, 16 insertions, 1 deletions
diff --git a/program/include/rcube_shared.inc b/program/include/rcube_shared.inc
index fe1a560a3..8f4efdb07 100644
--- a/program/include/rcube_shared.inc
+++ b/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)
{