From 9fee0ed9af6bb1daa3af2ff7290f5589040b4821 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Sun, 16 Oct 2005 15:12:24 -0400
Subject: [PATCH] Fixed folder display; added Portuguese and Catalan

---
 program/include/rcube_shared.inc |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/program/include/rcube_shared.inc b/program/include/rcube_shared.inc
index 21c3ae8..693a2c8 100644
--- a/program/include/rcube_shared.inc
+++ b/program/include/rcube_shared.inc
@@ -1109,6 +1109,9 @@
   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 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

--
Gitblit v1.9.1