Code

Oups. Made mb_strlen work propperly with utf-8
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 18 May 2005 11:43:26 +0000 (11:43 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 18 May 2005 11:43:26 +0000 (11:43 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@242 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_tabs.inc

index 1bab2b70f9a0972efafe94992acd805f6def0a4a..a8608b0613411ac5350d9e1a0607b60fe29a26ca 100644 (file)
@@ -137,10 +137,13 @@ class tabs
 
                /* Paint tab */
                $display.= "<td style=\"vertical-align:bottom; width:100px;\">";
+
+               /* Shorten string if its too long for the tab headers*/
                $title= _($name);
-               if (mb_strlen($title) > 14){
+               if (mb_strlen($title, 'UTF-8') > 13){
                        $title= mb_substr($title,0, 11, 'UTF-8')."...";
                }
+               
                if ($_SESSION['js']==FALSE){    
                        $display.= "<div class=\"$style[$index]\"><input type=\"submit\" name=\"$class\"".
                                   " class=\"$style[$index]\" value=\"$title\"";