From bac7d1742d45f256ded98656482ec9995e1c330a Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Tue, 18 Jul 2006 17:02:43 -0400 Subject: [PATCH] Fixed bugs #1364122, #1468895, ticket #1483811 and other minor bugs --- program/include/rcube_shared.inc | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-) diff --git a/program/include/rcube_shared.inc b/program/include/rcube_shared.inc index fe1a560..8f4efdb 100644 --- a/program/include/rcube_shared.inc +++ b/program/include/rcube_shared.inc @@ -1334,7 +1334,8 @@ } - +// 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 @@ } +// 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) { -- Gitblit v1.9.1