* Created new function, t3lib_div::fixed_lgd_cs(), which should be used in the backen...
authorKasper Skårhøj <kasper@typo3.org>
Tue, 18 May 2004 09:14:25 +0000 (09:14 +0000)
committerKasper Skårhøj <kasper@typo3.org>
Tue, 18 May 2004 09:14:25 +0000 (09:14 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@309 709f56b5-9817-0410-a4d7-c38de5d9e867

27 files changed:
ChangeLog
t3lib/class.t3lib_admin.php
t3lib/class.t3lib_befunc.php
t3lib/class.t3lib_clipboard.php
t3lib/class.t3lib_diff.php
t3lib/class.t3lib_div.php
t3lib/class.t3lib_loaddbgroup.php
t3lib/class.t3lib_page.php
t3lib/class.t3lib_positionmap.php
t3lib/class.t3lib_tceforms.php
t3lib/class.t3lib_transferdata.php
t3lib/class.t3lib_treeview.php
t3lib/class.t3lib_tsparser_ext.php
typo3/alt_clickmenu.php
typo3/alt_shortcut.php
typo3/browse_links.php
typo3/class.db_list.inc
typo3/class.db_list_extra.inc
typo3/class.file_list.inc
typo3/mod/web/func/index.php
typo3/mod/web/info/index.php
typo3/mod/web/perm/index.php
typo3/show_item.php
typo3/sysext/cms/layout/class.tx_cms_layout.php
typo3/sysext/cms/layout/db_layout.php
typo3/sysext/lang/lang.php
typo3/template.php

index cf57660..ef0c1af 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2004-05-18  Kasper Skårhøj,,,  <kasper@typo3.com>
+
+       * Created new function, t3lib_div::fixed_lgd_cs(), which should be used in the backend wherever a string is shortend for visual display. This function will truncate the string according to the backend charset (which should of course be set by forceCharset to a fixed value). This new function has also been substituted numerous places in the source of course (hence all the script updates).
+
 2004-05-17  Kasper Skårhøj,,,  <kasper@typo3.com>
 
        * Moved "install" extension to be a sys extension in sysext/
@@ -40,7 +44,7 @@
 
 2004-04-26  Kasper Skårhøj,,,  <kasper@typo3.com>
 
-       * Added prefix to relative file reference in @import style sheet 
+       * Added prefix to relative file reference in @import style sheet
 
 2004-04-26  Kasper Skårhøj,,,  <kasper@typo3.com>
 
index 26379e3..7040b32 100644 (file)
@@ -131,7 +131,7 @@ class t3lib_admin {
                                $PM = 'join';
                                $LN = ($a==$c)?'blank':'line';
                                $BTM = ($a==$c)?'bottom':'';
-                               $this->genTree_HTML.= $depthData.'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/ol/'.$PM.$BTM.'.gif','width="18" height="16"').' align="top" alt="" />'.t3lib_iconWorks::getIconImage('pages',$row,$this->backPath,'align="top"').htmlspecialchars($row['uid'].': '.t3lib_div::fixed_lgd(strip_tags($row['title']),50)).'</span></div>';
+                               $this->genTree_HTML.= $depthData.'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/ol/'.$PM.$BTM.'.gif','width="18" height="16"').' align="top" alt="" />'.t3lib_iconWorks::getIconImage('pages',$row,$this->backPath,'align="top"').htmlspecialchars($row['uid'].': '.t3lib_div::fixed_lgd_cs(strip_tags($row['title']),50)).'</span></div>';
                        }
 
                        if (isset($page_idlist[$newID]))        {
index 19fb676..62ea7b6 100755 (executable)
@@ -593,8 +593,8 @@ class t3lib_BEfunc  {
                                        );
                        if ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                                $uid = $row['pid'];
-                               $output = '/'.t3lib_div::fixed_lgd(strip_tags($row['title']),$titleLimit).$output;
-                               if ($fullTitleLimit)    $fullOutput = '/'.t3lib_div::fixed_lgd(strip_tags($row['title']),$fullTitleLimit).$fullOutput;
+                               $output = '/'.t3lib_div::fixed_lgd_cs(strip_tags($row['title']),$titleLimit).$output;
+                               if ($fullTitleLimit)    $fullOutput = '/'.t3lib_div::fixed_lgd_cs(strip_tags($row['title']),$fullTitleLimit).$fullOutput;
                        } else {
                                break;
                        }
@@ -1644,7 +1644,7 @@ class t3lib_BEfunc        {
                                if ($TCA[$table]['ctrl']['label_alt_force'])    $t=implode(', ',$tA);
                        }
                        if ($prep)      {
-                               $t = htmlspecialchars(t3lib_div::fixed_lgd($t,$GLOBALS['BE_USER']->uc['titleLen']));
+                               $t = htmlspecialchars(t3lib_div::fixed_lgd_cs($t,$GLOBALS['BE_USER']->uc['titleLen']));
                                if (!strcmp(trim($t),''))       $t='<em>['.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.no_title',1).']</em>';
                        }
                        return $t;
@@ -1737,12 +1737,12 @@ class t3lib_BEfunc      {
                                        } elseif ($theColConf['MM'])    {
                                                $l='N/A';
                                        } elseif ($value)       {
-                                               $l=t3lib_div::fixed_lgd(strip_tags($value),200);
+                                               $l=t3lib_div::fixed_lgd_cs(strip_tags($value),200);
                                        }
                                break;
                        }
                        if ($fixed_lgd_chars)   {
-                               return t3lib_div::fixed_lgd($l,$fixed_lgd_chars);
+                               return t3lib_div::fixed_lgd_cs($l,$fixed_lgd_chars);
                        } else {
                                return $l;
                        }
index 390d244..1d57aa9 100755 (executable)
@@ -382,7 +382,7 @@ class t3lib_clipboard {
                                                        $lines[]='
                                                                <tr>
                                                                        <td class="'.$bgColClass.'">'.$icon.'</td>
-                                                                       <td class="'.$bgColClass.'" nowrap="nowrap" width="95%">&nbsp;'.$this->linkItemText(htmlspecialchars(t3lib_div::fixed_lgd(basename($v),$GLOBALS['BE_USER']->uc['titleLen'])),$v).
+                                                                       <td class="'.$bgColClass.'" nowrap="nowrap" width="95%">&nbsp;'.$this->linkItemText(htmlspecialchars(t3lib_div::fixed_lgd_cs(basename($v),$GLOBALS['BE_USER']->uc['titleLen'])),$v).
                                                                                ($pad=='normal'?(' <strong>('.($this->clipData['normal']['mode']=='copy'?$this->clLabel('copy','cm'):$this->clLabel('cut','cm')).')</strong>'):'').'&nbsp;'.($thumb?'<br />'.$thumb:'').'</td>
                                                                        <td class="'.$bgColClass.'" align="center">'.
                                                                        '<a href="#" onclick="'.htmlspecialchars('top.launchView(\''.$v.'\', \'\'); return false;').'"><img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/zoom2.gif','width="12" height="12"').' hspace="2" border="0" title="'.$this->clLabel('info','cm').'" alt="" /></a>'.
@@ -400,7 +400,7 @@ class t3lib_clipboard {
                                                        $lines[]='
                                                                <tr>
                                                                        <td class="'.$bgColClass.'">'.$this->linkItemText(t3lib_iconWorks::getIconImage($table,$rec,$this->backPath,'hspace="20" title="'.htmlspecialchars(t3lib_BEfunc::getRecordIconAltText($rec,$table)).'"'),$rec,$table).'</td>
-                                                                       <td class="'.$bgColClass.'" nowrap="nowrap" width="95%">&nbsp;'.$this->linkItemText(htmlspecialchars(t3lib_div::fixed_lgd(t3lib_BEfunc::getRecordTitle($table,$rec),$GLOBALS['BE_USER']->uc['titleLen'])),$rec,$table).
+                                                                       <td class="'.$bgColClass.'" nowrap="nowrap" width="95%">&nbsp;'.$this->linkItemText(htmlspecialchars(t3lib_div::fixed_lgd_cs(t3lib_BEfunc::getRecordTitle($table,$rec),$GLOBALS['BE_USER']->uc['titleLen'])),$rec,$table).
                                                                                ($pad=='normal'?(' <strong>('.($this->clipData['normal']['mode']=='copy'?$this->clLabel('copy','cm'):$this->clLabel('cut','cm')).')</strong>'):'').'&nbsp;</td>
                                                                        <td class="'.$bgColClass.'" align="center">'.
                                                                        '<a href="#" onclick="'.htmlspecialchars('top.launchView(\''.$table.'\', \''.intval($uid).'\'); return false;').'"><img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/zoom2.gif','width="12" height="12"').' hspace="2" border="0" title="'.$this->clLabel('info','cm').'" alt="" /></a>'.
@@ -701,8 +701,8 @@ class t3lib_clipboard {
                        // Message:
                $conf='confirm('.$GLOBALS['LANG']->JScharCode(sprintf(
                        $msg,
-                       t3lib_div::fixed_lgd($selRecTitle,30),
-                       t3lib_div::fixed_lgd($thisRecTitle,30)
+                       t3lib_div::fixed_lgd_cs($selRecTitle,30),
+                       t3lib_div::fixed_lgd_cs($thisRecTitle,30)
                        )).')';
                return $conf;
        }
index 5cd5b61..45636b0 100755 (executable)
@@ -186,7 +186,7 @@ class t3lib_diff {
         */
        function addClearBuffer($clearBuffer,$last=0)   {
                if (strlen($clearBuffer)>200)   {
-                       $clearBuffer=($this->clearBufferIdx?t3lib_div::fixed_lgd($clearBuffer,70):'').'['.strlen($clearBuffer).']'.(!$last?t3lib_div::fixed_lgd_pre($clearBuffer,70):'');
+                       $clearBuffer=($this->clearBufferIdx?t3lib_div::fixed_lgd_cs($clearBuffer,70):'').'['.strlen($clearBuffer).']'.(!$last?t3lib_div::fixed_lgd_cs($clearBuffer,-70):'');
                }
                $this->clearBufferIdx++;
                return $clearBuffer;
index cc22962..5b80951 100755 (executable)
@@ -467,19 +467,23 @@ class t3lib_div {
         * Truncate string
         * Returns a new string of max. $chars length.
         * If the string is longer, it will be truncated and appended with '...'.
+        * DEPRECIATED. Works ONLY for single-byte charsets! USE t3lib_div::fixed_lgd_cs() instead
         *
         * Usage: 119
         *
         * @param       string          $string         string to truncate
-        * @param       integer         $chars  must be an integer of at least 4
+        * @param       integer         $chars  must be an integer with an absolute value of at least 4. if negative the string is cropped from the right end.
         * @param       string          String to append to the the output if it is truncated, default is '...'
         * @return      string          new string
         * @see fixed_lgd_pre()
         */
-       function fixed_lgd($string,$chars,$preStr='...')        {
+       function fixed_lgd($string,$origChars,$preStr='...')    {
+               $chars = abs($origChars);
                if ($chars >= 4)        {
                        if(strlen($string)>$chars)  {
-                               return trim(substr($string, 0, $chars-3)).$preStr;
+                               return $origChars < 0 ?
+                                       $preStr.trim(substr($string, -($chars-3))) :
+                                       trim(substr($string, 0, $chars-3)).$preStr;
                        }
                }
                return $string;
@@ -490,6 +494,7 @@ class t3lib_div {
         * Returns a new string of max. $chars length.
         * If the string is longer, it will be truncated and prepended with '...'.
         * This works like fixed_lgd, but is truncated in the start of the string instead of the end
+        * DEPRECIATED. Use either fixed_lgd() or fixed_lgd_cs() (with negative input value for $chars)
         *
         * Usage: 19
         *
@@ -503,6 +508,23 @@ class t3lib_div {
        }
 
        /**
+        * Truncates a string with appended/prepended "..." and takes backend character set into consideration
+        * Use only from backend!
+        *
+        * @param       string          $string         string to truncate
+        * @param       integer         $chars  must be an integer with an absolute value of at least 4. if negative the string is cropped from the right end.
+        * @return      string          New string
+        * @see fixed_lgd()
+        */
+       function fixed_lgd_cs($string,$chars)   {
+               if (is_object($GLOBALS['LANG']))        {
+                       return $GLOBALS['LANG']->csConvObj->crop($this->charSet,$string,$chars,'...');
+               } else {
+                       return t3lib_div::fixed_lgd($string, $chars);
+               }
+       }
+
+       /**
         * Breaks up the text for emails
         *
         * Usage: 1
@@ -732,7 +754,7 @@ class t3lib_div {
         */
        function uniqueList()   {
                $listArray = array();
-               
+
                $arg_list = func_get_args();
                foreach ($arg_list as $in_list) {
                        if (!is_array($in_list))        {
@@ -844,8 +866,8 @@ class t3lib_div {
 
        /**
         * strtoupper which converts danish (and other characters) characters as well
-        * (Depreciated, use PHP function with locale settings instead or for HTML output, wrap your content in <span class="uppercase">...</span>)
-        * Usage: 4
+        * (DEPRECIATED, use t3lib_cs::conv_case() instead or for HTML output, wrap your content in <span class="uppercase">...</span>)
+        * Usage: 0
         *
         * @param       string          String to process
         * @return      string
index 06ab26d..eb1fbc0 100755 (executable)
@@ -342,7 +342,7 @@ class t3lib_loadDBGroup     {
                foreach($this->itemArray as $key => $val)       {
                        $theRow = $this->results[$val['table']][$val['id']];
                        if ($theRow && is_array($TCA[$val['table']]))   {
-                               $label = t3lib_div::fixed_lgd(strip_tags($theRow[$TCA[$val['table']]['ctrl']['label']]),$titleLen);
+                               $label = t3lib_div::fixed_lgd_cs(strip_tags($theRow[$TCA[$val['table']]['ctrl']['label']]),$titleLen);
                                $label = ($label)?$label:'[...]';
                                $output[]=str_replace(',','',$val['table'].'_'.$val['id'].'|'.rawurlencode($label));
                        }
index 485804b..001cc47 100755 (executable)
@@ -498,7 +498,7 @@ class t3lib_pageSelect {
                        $path = '';
                        for ($a=0;$a<$c;$a++)   {
                                if ($rl[$a]['uid'])     {
-                                       $path.='/'.t3lib_div::fixed_lgd(strip_tags($rl[$a]['title']),$len);
+                                       $path.='/'.t3lib_div::fixed_lgd_cs(strip_tags($rl[$a]['title']),$len);
                                }
                        }
                        return $path;
index 6a49c2a..ba47367 100755 (executable)
@@ -204,7 +204,7 @@ class t3lib_positionMap {
                                // The line with the icon and title:
                        $t_code='<span class="nobr">'.
                                $dat['HTML'].
-                               $this->linkPageTitle($this->boldTitle(htmlspecialchars(t3lib_div::fixed_lgd($dat['row']['title'],$BE_USER->uc['titleLen'])),$dat,$id),$dat['row']).
+                               $this->linkPageTitle($this->boldTitle(htmlspecialchars(t3lib_div::fixed_lgd_cs($dat['row']['title'],$BE_USER->uc['titleLen'])),$dat,$id),$dat['row']).
                                '</span><br />';
                        $code.=$t_code;
                }
index a2852f0..91e60f1 100755 (executable)
@@ -1624,7 +1624,7 @@ class t3lib_TCEforms      {
                                        $rowCells=array();
 
                                                // Icon:
-                                       $rowCells['title'] = '<img src="clear.gif" width="'.($level*16).'" height="1" alt="" /><strong>'.htmlspecialchars(t3lib_div::fixed_lgd($this->sL($value['tx_templavoila']['title']),30)).'</strong>';;
+                                       $rowCells['title'] = '<img src="clear.gif" width="'.($level*16).'" height="1" alt="" /><strong>'.htmlspecialchars(t3lib_div::fixed_lgd_cs($this->sL($value['tx_templavoila']['title']),30)).'</strong>';;
 
                                        $rowCells['formEl']='';
                                        if ($value['type']=='array')    {
@@ -2063,7 +2063,7 @@ class t3lib_TCEforms      {
                                        while(list(,$pp)=each($itemArray))      {
                                                $pRec = t3lib_BEfunc::getRecord($pp['table'],$pp['id']);
                                                if (is_array($pRec))    {
-                                                       $pTitle = t3lib_div::fixed_lgd($this->noTitle($pRec[$GLOBALS['TCA'][$pp['table']]['ctrl']['label']]),$this->titleLen);
+                                                       $pTitle = t3lib_div::fixed_lgd_cs($this->noTitle($pRec[$GLOBALS['TCA'][$pp['table']]['ctrl']['label']]),$this->titleLen);
                                                        $pUid = $pp['table'].'_'.$pp['id'];
                                                        $uidList[]=$pUid;
                                                        $opt[]='<option value="'.htmlspecialchars($pUid).'">'.htmlspecialchars($pTitle).'</option>';
@@ -2841,7 +2841,7 @@ class t3lib_TCEforms      {
                        } else $icon='';
                                // Add the item:
                        $items[] = array(
-                               t3lib_div::fixed_lgd($lPrefix.strip_tags(t3lib_BEfunc::getRecordTitle($f_table,$row)),$this->titleLen),
+                               t3lib_div::fixed_lgd_cs($lPrefix.strip_tags(t3lib_BEfunc::getRecordTitle($f_table,$row)),$this->titleLen),
                                $uidPre.$row['uid'],
                                $icon
                        );
@@ -3032,7 +3032,7 @@ class t3lib_TCEforms      {
                reset($arr);
                while(list($k,$v)=each($arr))   {
                        $arr[$k]=str_replace('###ID_NEW_INDICATOR###',(strstr($rec['uid'],'NEW')?' <font color="red"><b>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.new',1).'</b></font>':' ['.$rec['uid'].']'),$arr[$k]);
-                       $rLabel = trim(t3lib_div::fixed_lgd(t3lib_BEfunc::getRecordTitle($table,$rec),40));
+                       $rLabel = trim(t3lib_div::fixed_lgd_cs(t3lib_BEfunc::getRecordTitle($table,$rec),40));
                        $arr[$k]=str_replace('###RECORD_LABEL###',htmlspecialchars($rLabel),$arr[$k]);
                        $arr[$k]=str_replace('###TABLE_TITLE###',htmlspecialchars($this->sL($TCA[$table]['ctrl']['title'])),$arr[$k]);
 
index 2054f92..9e8165c 100755 (executable)
@@ -244,10 +244,10 @@ class t3lib_transferData {
 
        /**
         * This function performs processing on the input $row array and stores internally a corresponding array which contains processed values, ready to pass on to the TCEforms rendering in the frontend!
-        * The objective with this function is to prepare the content for handling in TCEforms. 
-        * In opposite to renderRecord() this function do not prepare things like fetching TSconfig and others. 
+        * The objective with this function is to prepare the content for handling in TCEforms.
+        * In opposite to renderRecord() this function do not prepare things like fetching TSconfig and others.
         * The resulting, processed row will be returned.
-        * 
+        *
         * @param       string          The table name
         * @param       string          The uid value of the record (integer). Can also be a string (NEW-something) if the record is a NEW record.
         * @param       integer         The pid integer. For existing records this is of course the row's "pid" field. For new records it can be either a page id (positive) or a pointer to another record from the SAME table (negative) after which the record should be inserted (or on same page)
@@ -298,9 +298,9 @@ class t3lib_transferData {
 
                        // Finally, store the result:
                reset($totalRecordContent);
-               
+
                return $totalRecordContent;
-               
+
        }
 
        /**
@@ -791,11 +791,11 @@ class t3lib_transferData {
                        if (isset($recordList[$theId])) {
                                $lPrefix = $this->sL($fieldConfig['config'][($theId>0?'':'neg_').'foreign_table_prefix']);
                                if ($fieldConfig['config']['MM'])       {
-                                       $dataAcc[]=rawurlencode($theId).'|'.rawurlencode(t3lib_div::fixed_lgd($lPrefix.strip_tags($recordList[$theId]),$GLOBALS['BE_USER']->uc['titleLen']));
+                                       $dataAcc[]=rawurlencode($theId).'|'.rawurlencode(t3lib_div::fixed_lgd_cs($lPrefix.strip_tags($recordList[$theId]),$GLOBALS['BE_USER']->uc['titleLen']));
                                } else {
                                        foreach($elements as $eKey => $value)   {
                                                if (!strcmp($theId,$value))     {
-                                                       $dataAcc[$eKey]=rawurlencode($theId).'|'.rawurlencode(t3lib_div::fixed_lgd($lPrefix.strip_tags($recordList[$theId]),$GLOBALS['BE_USER']->uc['titleLen']));
+                                                       $dataAcc[$eKey]=rawurlencode($theId).'|'.rawurlencode(t3lib_div::fixed_lgd_cs($lPrefix.strip_tags($recordList[$theId]),$GLOBALS['BE_USER']->uc['titleLen']));
                                                }
                                        }
                                }
index a053924..1237004 100755 (executable)
@@ -324,7 +324,7 @@ class t3lib_treeView {
                $this->recs = array();
                $this->ids = array();
                $this->ids_hierarchy = array();
-       
+
                        // setting this to false disables the use of array-trees by default
                $this->data = false;
                $this->dataLookup = false;
@@ -664,7 +664,7 @@ class t3lib_treeView {
         * @return      string          The title.
         */
        function getTitleStr($row,$titleLen=30) {
-               $title = (!strcmp(trim($row['title']),'')) ? '<em>['.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.no_title',1).']</em>' : htmlspecialchars(t3lib_div::fixed_lgd($row['title'],$titleLen));
+               $title = (!strcmp(trim($row['title']),'')) ? '<em>['.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.no_title',1).']</em>' : htmlspecialchars(t3lib_div::fixed_lgd_cs($row['title'],$titleLen));
                return $title;
        }
 
@@ -1064,7 +1064,7 @@ class t3lib_TCEforms_SelectTreeView extends t3lib_treeview {
 
        var $TCEforms_itemFormElName='';
        var $TCEforms_nonSelectableItemsArray=array();
-       
+
        function wrapTitle($title,$v)   {
                if($v['uid']>0) {
                        if (in_array($v['uid'],$this->TCEforms_nonSelectableItemsArray)) {
@@ -1078,9 +1078,9 @@ class t3lib_TCEforms_SelectTreeView extends t3lib_treeview {
                }
        }
 }
-                       
-                       
-                       
+
+
+
 
 
 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_treeview.php']) {
index fc5cb15..1818df9 100755 (executable)
@@ -573,7 +573,7 @@ class t3lib_tsparser_ext extends t3lib_TStemplate   {
                                $A_B="";
                                $A_E="";
                        }
-                       $HTML.=($first?'':'<IMG src="'.$GLOBALS["BACK_PATH"].'t3lib/gfx/ol/'.$PM.$BTM.'.gif" width="18" height="16" align="top" border=0>').'<IMG src="'.$GLOBALS["BACK_PATH"].$icon.'" width="18" height="16" align="top" title="'.$alttext.'">'.$A_B.t3lib_div::fixed_lgd($row['title'],$GLOBALS["BE_USER"]->uc["titleLen"]).$A_E."&nbsp;&nbsp;";
+                       $HTML.=($first?'':'<IMG src="'.$GLOBALS["BACK_PATH"].'t3lib/gfx/ol/'.$PM.$BTM.'.gif" width="18" height="16" align="top" border=0>').'<IMG src="'.$GLOBALS["BACK_PATH"].$icon.'" width="18" height="16" align="top" title="'.$alttext.'">'.$A_B.t3lib_div::fixed_lgd_cs($row['title'],$GLOBALS["BE_USER"]->uc["titleLen"]).$A_E."&nbsp;&nbsp;";
                        $RL = $this->ext_getRootlineNumber($row['pid']);
                        $keyArray[] = '<tr>
                                                        <td nowrap>'.$HTML.'</td>
@@ -1104,7 +1104,7 @@ class t3lib_tsparser_ext extends t3lib_TStemplate {
                                                }
                                                if (strlen($head)>35)   {
                                                        if (!$body) {$body=$head;}
-                                                       $head=t3lib_div::fixed_lgd($head,35);
+                                                       $head=t3lib_div::fixed_lgd_cs($head,35);
                                                }
                                                $typeDat=$this->ext_getTypeData($params["type"]);
                                                $checked="";
index e2d8f5b..999c195 100755 (executable)
@@ -272,7 +272,7 @@ class clickMenu {
                                $selItem = $this->clipObj->getSelectedRecord();
                                $elInfo=array(
                                        $selItem['_RECORD_TITLE'],
-                                       ($root?$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']:t3lib_div::fixed_lgd(t3lib_BEfunc::getRecordTitle($table,$this->rec),$BE_USER->uc['titleLen'])),
+                                       ($root?$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']:t3lib_div::fixed_lgd_cs(t3lib_BEfunc::getRecordTitle($table,$this->rec),$BE_USER->uc['titleLen'])),
                                        $this->clipObj->currentMode()
                                );
                                if ($table=='pages' && ($lCP & 8))      {
@@ -284,7 +284,7 @@ class clickMenu {
                        }
 
                                // Delete:
-                       $elInfo=array(t3lib_div::fixed_lgd(t3lib_BEfunc::getRecordTitle($table,$this->rec),$BE_USER->uc['titleLen']));
+                       $elInfo=array(t3lib_div::fixed_lgd_cs(t3lib_BEfunc::getRecordTitle($table,$this->rec),$BE_USER->uc['titleLen']));
                        if(!in_array('delete',$this->disabledItems) && !$root && $BE_USER->isPSet($lCP,$table,'delete'))        {
                                $menuItems[]='spacer';
                                $menuItems['delete']=$this->DB_delete($table,$uid,$elInfo);
index f61d52a..4aecd33 100755 (executable)
@@ -287,7 +287,7 @@ class SC_alt_shortcut {
                        $this->lines[]='<td class="'.$bgColorClass.'"><a href="#" onclick="'.htmlspecialchars($onC).'"><img src="'.$this->getIcon($row['module_name']).'" title="'.htmlspecialchars($titleA).'" alt="" /></a></td>';
                        if (trim($row['description']))  {
                                $kkey = strtolower(substr($row['description'],0,20)).'_'.$row['uid'];
-                               $this->selOpt[$kkey]='<option value="'.htmlspecialchars($jumpSC).'">'.htmlspecialchars(t3lib_div::fixed_lgd($row['description'],50)).'</option>';
+                               $this->selOpt[$kkey]='<option value="'.htmlspecialchars($jumpSC).'">'.htmlspecialchars(t3lib_div::fixed_lgd_cs($row['description'],50)).'</option>';
                        }
                        $formerGr=$row['sc_group'];
                }
index 3fd1716..6a34dd2 100755 (executable)
@@ -206,7 +206,7 @@ class TBE_browser_recordList extends localRecordList {
                if (!$code) {
                        $code = '<i>['.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.no_title',1).']</i>';
                } else {
-                       $code = htmlspecialchars(t3lib_div::fixed_lgd($code,$this->fixedL));
+                       $code = htmlspecialchars(t3lib_div::fixed_lgd_cs($code,$this->fixedL));
                }
 
                $titleCol = $TCA[$table]['ctrl']['label'];
@@ -543,7 +543,7 @@ class localFolderTree extends t3lib_folderTree {
                                // Put table row with folder together:
                        $out.='
                                <tr class="'.$bgColorClass.'">
-                                       <td nowrap="nowrap">'.$v['HTML'].$this->wrapTitle(t3lib_div::fixed_lgd($v['row']['title'],$titleLen),$v['row']).'</td>
+                                       <td nowrap="nowrap">'.$v['HTML'].$this->wrapTitle(t3lib_div::fixed_lgd_cs($v['row']['title'],$titleLen),$v['row']).'</td>
                                        '.$arrCol.'
                                        <td>'.$cEbullet.'</td>
                                </tr>';
@@ -1492,7 +1492,7 @@ class SC_browse_links {
                        $titleLen = intval($GLOBALS['BE_USER']->uc['titleLen']);
                        $mainPageRec = t3lib_BEfunc::getRecord('pages',$expPageId);
                        $picon = t3lib_iconWorks::getIconImage('pages',$mainPageRec,'','');
-                       $picon.= htmlspecialchars(t3lib_div::fixed_lgd($mainPageRec['title'],$titleLen));
+                       $picon.= htmlspecialchars(t3lib_div::fixed_lgd_cs($mainPageRec['title'],$titleLen));
                        $out.= $picon.'<br />';
 
                                // Look up tt_content elements from the expanded page:
@@ -1520,7 +1520,7 @@ class SC_browse_links {
                                                $arrCol.
                                                '<a href="#" onclick="return link_typo3Page(\''.$expPageId.'\',\'#'.$row['uid'].'\');">'.
                                                $icon.
-                                               htmlspecialchars(t3lib_div::fixed_lgd($row['header'],$titleLen)).
+                                               htmlspecialchars(t3lib_div::fixed_lgd_cs($row['header'],$titleLen)).
                                                '</a><br />';
 
                                        // Finding internal anchor points:
@@ -1582,7 +1582,7 @@ class SC_browse_links {
                        }
                        $picon=t3lib_iconWorks::getIconImage('pages',$mainPageRec,'','');
                        $pBicon=$ATag2?'<img'.t3lib_iconWorks::skinImg('','gfx/plusbullet2.gif','width="18" height="16"').' alt="" />':'';
-                       $pText=htmlspecialchars(t3lib_div::fixed_lgd($mainPageRec['title'],$titleLen));
+                       $pText=htmlspecialchars(t3lib_div::fixed_lgd_cs($mainPageRec['title'],$titleLen));
                        $out.=$picon.$ATag2.$pBicon.$ATag_e.$ATag.$pText.$ATag_e.'<br />';
 
                                // Initialize the record listing:
@@ -1662,7 +1662,7 @@ class SC_browse_links {
                                // Create header element; The folder from which files are listed.
                        $titleLen=intval($GLOBALS['BE_USER']->uc['titleLen']);
                        $picon='<img'.t3lib_iconWorks::skinImg('','gfx/i/_icon_webfolders.gif','width="18" height="16"').' alt="" />';
-                       $picon.=htmlspecialchars(t3lib_div::fixed_lgd(basename($expandFolder),$titleLen));
+                       $picon.=htmlspecialchars(t3lib_div::fixed_lgd_cs(basename($expandFolder),$titleLen));
                        $picon='<a href="#" onclick="return link_folder(\''.t3lib_div::rawUrlEncodeFP(substr($expandFolder,strlen(PATH_site))).'\');">'.$picon.'</a>';
                        $out.=$picon.'<br />';
 
@@ -1695,7 +1695,7 @@ class SC_browse_links {
                                                        $arrCol.
                                                        '<a href="#" onclick="return link_folder(\''.t3lib_div::rawUrlEncodeFP(substr($filepath,strlen(PATH_site))).'\');">'.
                                                        $icon.
-                                                       htmlspecialchars(t3lib_div::fixed_lgd(basename($filepath),$titleLen)).
+                                                       htmlspecialchars(t3lib_div::fixed_lgd_cs(basename($filepath),$titleLen)).
                                                        '</a><br />';
                                }
                        }
@@ -1728,7 +1728,7 @@ class SC_browse_links {
                                        // Create the header of current folder:
                                $titleLen=intval($GLOBALS['BE_USER']->uc['titleLen']);
                                $picon='<img'.t3lib_iconWorks::skinImg('','gfx/i/_icon_webfolders.gif','width="18" height="16"').' alt="" />';
-                               $picon.=htmlspecialchars(t3lib_div::fixed_lgd(basename($expandFolder),$titleLen));
+                               $picon.=htmlspecialchars(t3lib_div::fixed_lgd_cs(basename($expandFolder),$titleLen));
                                $out.=$picon.'<br />';
 
                                        // Init graphic object for reading file dimensions:
@@ -1773,7 +1773,7 @@ class SC_browse_links {
                                        $ATag2_e='</a>';
 
                                                // Combine the stuff:
-                                       $filenameAndIcon=$ATag_alt.$icon.htmlspecialchars(t3lib_div::fixed_lgd(basename($filepath),$titleLen)).$ATag_e;
+                                       $filenameAndIcon=$ATag_alt.$icon.htmlspecialchars(t3lib_div::fixed_lgd_cs(basename($filepath),$titleLen)).$ATag_e;
 
                                                // Show element:
                                        if ($pDim)      {               // Image...
@@ -1843,7 +1843,7 @@ class SC_browse_links {
 
                                        $titleLen=intval($GLOBALS['BE_USER']->uc['titleLen']);
                                        $picon='<img'.t3lib_iconWorks::skinImg('','gfx/i/_icon_webfolders.gif','width="18" height="16"').' alt="" />';
-                                       $picon.=htmlspecialchars(t3lib_div::fixed_lgd(basename($expandFolder),$titleLen));
+                                       $picon.=htmlspecialchars(t3lib_div::fixed_lgd_cs(basename($expandFolder),$titleLen));
                                        $out.=$picon.'<br />';
 
                                                // Init row-array:
@@ -1870,7 +1870,7 @@ class SC_browse_links {
                                                        $ficon = t3lib_BEfunc::getFileIcon(strtolower($fI['extension']));
                                                        $size=' ('.t3lib_div::formatSize(filesize($filepath)).'bytes'.($pDim?', '.$pDim:'').')';
                                                        $icon = '<img'.t3lib_iconWorks::skinImg('','gfx/fileicons/'.$ficon,'width="18" height="16"').' class="absmiddle" title="'.htmlspecialchars($fI['basename'].$size).'" alt="" />';
-                                                       $filenameAndIcon=$icon.htmlspecialchars(t3lib_div::fixed_lgd(basename($filepath),$titleLen));
+                                                       $filenameAndIcon=$icon.htmlspecialchars(t3lib_div::fixed_lgd_cs(basename($filepath),$titleLen));
 
                                                        if (t3lib_div::_GP('noLimit'))  {
                                                                $maxW=10000;
@@ -2071,7 +2071,7 @@ class SC_browse_links {
 
                                                        $pageRow = t3lib_BEfunc::getRecord('pages',$id);
                                                        $titleLen=intval($GLOBALS['BE_USER']->uc['titleLen']);
-                                                       $info['value']=$GLOBALS['LANG']->getLL('page',1)." '".htmlspecialchars(t3lib_div::fixed_lgd($pageRow['title'],$titleLen))."' (ID:".$id.($uP['fragment']?', #'.$uP['fragment']:'').')';
+                                                       $info['value']=$GLOBALS['LANG']->getLL('page',1)." '".htmlspecialchars(t3lib_div::fixed_lgd_cs($pageRow['title'],$titleLen))."' (ID:".$id.($uP['fragment']?', #'.$uP['fragment']:'').')';
                                                        $info['pageid']=$id;
                                                        $info['cElement']=$uP['fragment'];
                                                        $info['act']='page';
index 3a72887..bb38900 100755 (executable)
@@ -511,7 +511,7 @@ class recordList extends t3lib_recordList {
                if (!strcmp($code,'')) {
                        $code = '<i>['.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.no_title',1).']</i> - '.htmlspecialchars(t3lib_BEfunc::getRecordTitle($table,$row));
                } else {
-                       $code = htmlspecialchars(t3lib_div::fixed_lgd($code,$this->fixedL));
+                       $code = htmlspecialchars(t3lib_div::fixed_lgd_cs($code,$this->fixedL));
                }
 
                switch((string)$this->clickTitleMode)   {
index 3e80e81..2a687fe 100755 (executable)
@@ -236,7 +236,7 @@ class localRecordList extends recordList {
                if ($this->id)  {       // If there IS a real page...:
 
                                // Setting title of page + the "Go up" link:
-                       $theData[$titleCol].='<br /><span title="'.htmlspecialchars($row['_thePathFull']).'">'.htmlspecialchars(t3lib_div::fixed_lgd_pre($row['_thePath'],$this->fixedL)).'</span>';
+                       $theData[$titleCol].='<br /><span title="'.htmlspecialchars($row['_thePathFull']).'">'.htmlspecialchars(t3lib_div::fixed_lgd_cs($row['_thePath'],-$this->fixedL)).'</span>';
                        $theData['up'][]='<a href="'.htmlspecialchars($this->listURL($row['pid'])).'">'.
                                                        '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/i/pages_up.gif','width="18" height="16"').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.upOneLevel',1).'" alt="" />'.
                                                        '</a>';
@@ -246,7 +246,7 @@ class localRecordList extends recordList {
                } else {        // On root-level of page tree:
 
                                // Setting title of root (sitename):
-                       $theData[$titleCol].='<br />'.htmlspecialchars(t3lib_div::fixed_lgd_pre($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'],$this->fixedL));
+                       $theData[$titleCol].='<br />'.htmlspecialchars(t3lib_div::fixed_lgd_cs($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'],-$this->fixedL));
 
                                // Make Icon:
                        $theIcon='<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/i/_icon_website.gif','width="18" height="16"').' alt="" />';
index b3c05c8..ce9d0a5 100755 (executable)
@@ -170,12 +170,12 @@ class fileList extends t3lib_recordList {
                                $theIcon = '<img'.t3lib_iconWorks::skinImg($this->backPath,$icon,'width="18" height="16"').' title="'.htmlspecialchars($theFile['file']).'" alt="" />';
                                if ($this->clickMenus) $theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($theIcon,$path);
 
-                               $theData[$titleCol].='<br />'.t3lib_div::fixed_lgd_pre($title,$this->fixedL+20);        // No HTML specialchars here - HTML like <b> </b> is allowed
+                               $theData[$titleCol].='<br />'.t3lib_div::fixed_lgd_cs($title,-($this->fixedL+20));      // No HTML specialchars here - HTML like <b> </b> is allowed
                                $theData['up'].=$this->linkWrapDir('<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/i/folder_up.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.upOneLevel',1).'" alt="" />',$theFile['path']);
                        } else {
                                        // root:0
                                $theIcon='<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/i/_icon_ftp.gif','width="18" height="16"').' alt="" />';
-                               $theData[$titleCol].='<br />'.htmlspecialchars(t3lib_div::fixed_lgd_pre($title,$this->fixedL+20));
+                               $theData[$titleCol].='<br />'.htmlspecialchars(t3lib_div::fixed_lgd_cs($title,-($this->fixedL+20)));
                        }
 
                                // Adding top element
index 1eecac2..c022a6d 100755 (executable)
@@ -120,7 +120,7 @@ class SC_mod_web_func_index extends t3lib_SCbase {
 
                        $headerSection = $this->doc->getHeader('pages',$this->pageinfo,$this->pageinfo['_thePath']).'<br />'.
                                $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.path').': '.
-                               '<span title="'.htmlspecialchars($this->pageinfo['_thePathFull']).'">'.htmlspecialchars(t3lib_div::fixed_lgd_pre($this->pageinfo['_thePath'],50)).'</span>';
+                               '<span title="'.htmlspecialchars($this->pageinfo['_thePathFull']).'">'.htmlspecialchars(t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'],-50)).'</span>';
 
                                // Draw the header.
                        $this->content.=$this->doc->startPage($LANG->getLL('title'));
index d741266..3379360 100755 (executable)
@@ -127,7 +127,7 @@ class SC_mod_web_info_index extends t3lib_SCbase {
 
                        $headerSection = $this->doc->getHeader('pages',$this->pageinfo,$this->pageinfo['_thePath']).'<br />'.
                                $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.path',1).': '.
-                               '<span title="'.htmlspecialchars($this->pageinfo['_thePathFull']).'">'.htmlspecialchars(t3lib_div::fixed_lgd_pre($this->pageinfo['_thePath'],50)).'</span>';
+                               '<span title="'.htmlspecialchars($this->pageinfo['_thePathFull']).'">'.htmlspecialchars(t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'],-50)).'</span>';
 
                                // Draw the header.
                        $this->doc->form='<form action="" method="post">';
index 53c89cb..6a2c6e1 100755 (executable)
@@ -246,7 +246,7 @@ class SC_mod_web_perm_index {
                                $this->doc->funcMenu(
                                        $this->doc->getHeader('pages',$this->pageinfo,htmlspecialchars($this->pageinfo['_thePath'])).'<br />'.
                                                $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.path',1).': '.
-                                               '<span title="'.htmlspecialchars($this->pageinfo['_thePathFull']).'">'.htmlspecialchars(t3lib_div::fixed_lgd_pre($this->pageinfo['_thePath'],50)).'</span>',
+                                               '<span title="'.htmlspecialchars($this->pageinfo['_thePathFull']).'">'.htmlspecialchars(t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'],-50)).'</span>',
                                        t3lib_BEfunc::getFuncMenu($this->id,'SET[mode]',$this->MOD_SETTINGS['mode'],$this->MOD_MENU['mode'])
                                ));
                        $this->content.=$this->doc->divider(5);
@@ -514,7 +514,7 @@ class SC_mod_web_perm_index {
                                // User/Group names:
                        $userN = $be_user_Array[$data['row']['perms_userid']] ? $be_user_Array[$data['row']['perms_userid']]['username'] : ($data['row']['perms_userid'] ? '<i>['.$data['row']['perms_userid'].']!</i>' : '');
                        $groupN = $be_group_Array[$data['row']['perms_groupid']] ? $be_group_Array[$data['row']['perms_groupid']]['title']  : ($data['row']['perms_groupid'] ? '<i>['.$data['row']['perms_groupid'].']!</i>' : '');
-                       $groupN=t3lib_div::fixed_lgd($groupN,20);
+                       $groupN=t3lib_div::fixed_lgd_cs($groupN,20);
 
                                // Seeing if editing of permissions are allowed for that page:
                        $editPermsAllowed=($data['row']['perms_userid']==$BE_USER->user['uid'] || $BE_USER->isAdmin());
index 582b865..f79c876 100755 (executable)
@@ -245,7 +245,7 @@ class SC_show_item {
                                $this->content.=$this->doc->divider(2);
 
                                $code="";
-                               $code.='Path: '.t3lib_div::fixed_lgd_pre($this->pageinfo["_thePath"],48).'<br />';
+                               $code.='Path: '.t3lib_div::fixed_lgd_cs($this->pageinfo["_thePath"],-48).'<br />';
                                $code.='Table: '.$LANG->sL($TCA[$this->table]["ctrl"]["title"]).' ('.$this->table.') - UID: '.$this->uid.'<br />';
                                $this->content.=$this->doc->section('',$code);
                        }
index 946cc7e..736f302 100755 (executable)
@@ -501,7 +501,7 @@ class tx_cms_layout extends recordList {
                                                        '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,$this->backPath)).'">'.
                                                        '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/edit2.gif','width="11" height="12"').' title="'.$GLOBALS['LANG']->getLL('edit',1).'" class="absmiddle" alt="" />'.
                                                        '</a>'.
-                                                       htmlspecialchars(t3lib_div::fixed_lgd($lpRecord['title'],20)).
+                                                       htmlspecialchars(t3lib_div::fixed_lgd_cs($lpRecord['title'],20)).
                                                        '</span>';
                                        } else {
                                                $lPLabel='';
@@ -1132,7 +1132,7 @@ class tx_cms_layout extends recordList {
                                        if ($fieldName==$thumbsCol)     {       // If the column is a thumbnail column:
                                                $out[$fieldName] = $this->thumbCode($row,$table,$fieldName);
                                        } else {        // ... otherwise just render the output:
-                                               $out[$fieldName] = nl2br(htmlspecialchars(trim(t3lib_div::fixed_lgd(t3lib_BEfunc::getProcessedValue($table,$fieldName,$row[$fieldName]),250))));
+                                               $out[$fieldName] = nl2br(htmlspecialchars(trim(t3lib_div::fixed_lgd_cs(t3lib_BEfunc::getProcessedValue($table,$fieldName,$row[$fieldName]),250))));
                                        }
                                } else {        // Each field is separated by <br /> and shown in the same cell (If not a TCA field, then explode the field name with ";" and check each value there as a TCA configured field)
                                        $theFields = explode(';',$fieldName);
@@ -1142,7 +1142,7 @@ class tx_cms_layout extends recordList {
                                                if ($TCA[$table]['columns'][$fName2])   {
                                                         $out[$fieldName].= '<b>'.$GLOBALS['LANG']->sL($TCA[$table]['columns'][$fName2]['label'],1).'</b>'.
                                                                                                '&nbsp;&nbsp;'.
-                                                                                               htmlspecialchars(t3lib_div::fixed_lgd(t3lib_BEfunc::getProcessedValue($table,$fName2,$row[$fName2]),25)).
+                                                                                               htmlspecialchars(t3lib_div::fixed_lgd_cs(t3lib_BEfunc::getProcessedValue($table,$fName2,$row[$fName2]),25)).
                                                                                                '<br />';
                                                }
                                        }
@@ -1905,9 +1905,9 @@ class tx_cms_layout extends recordList {
 
                        // Building data-arary with content:
                $theData = Array();
-               $theData['subject'] = t3lib_div::fixed_lgd(htmlspecialchars($row['subject']),25).'&nbsp; &nbsp;';
-               $theData['author'] = t3lib_div::fixed_lgd(htmlspecialchars($row['author']),15).'&nbsp; &nbsp;';
-               $theData['date'] = t3lib_div::fixed_lgd(t3lib_BEfunc::datetime($row['crdate']),20).'&nbsp; &nbsp;';
+               $theData['subject'] = t3lib_div::fixed_lgd_cs(htmlspecialchars($row['subject']),25).'&nbsp; &nbsp;';
+               $theData['author'] = t3lib_div::fixed_lgd_cs(htmlspecialchars($row['author']),15).'&nbsp; &nbsp;';
+               $theData['date'] = t3lib_div::fixed_lgd_cs(t3lib_BEfunc::datetime($row['crdate']),20).'&nbsp; &nbsp;';
                $theData['age'] = t3lib_BEfunc::calcAge(time()-$row['crdate'], $this->agePrefixes).'&nbsp; &nbsp;';
                if ($re)        {
                        $theData['replys'] = $re;
@@ -1969,7 +1969,7 @@ class tx_cms_layout extends recordList {
         */
        function renderText($input)     {
                $input = strip_tags($input);
-               $input = t3lib_div::fixed_lgd($input,1500);
+               $input = t3lib_div::fixed_lgd_cs($input,1500);
                return nl2br(htmlspecialchars(trim($this->wordWrapper($input))));
        }
 
index 5612b99..c66e8a6 100755 (executable)
@@ -563,7 +563,7 @@ class SC_db_layout {
                        }
                        $inValue = 'tt_content:'.$cRow['uid'];
                        $is_selected+=intval($edit_record==$inValue);
-                       $opt[]='<option value="'.$inValue.'"'.($edit_record==$inValue?' selected="selected"':'').'>'.htmlspecialchars(t3lib_div::fixed_lgd($cRow['header']?$cRow['header']:'['.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.no_title').'] '.strip_tags($cRow['bodytext']),$BE_USER->uc['titleLen'])).'</option>';
+                       $opt[]='<option value="'.$inValue.'"'.($edit_record==$inValue?' selected="selected"':'').'>'.htmlspecialchars(t3lib_div::fixed_lgd_cs($cRow['header']?$cRow['header']:'['.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.no_title').'] '.strip_tags($cRow['bodytext']),$BE_USER->uc['titleLen'])).'</option>';
                        $prev=-$cRow['uid'];
                }
 
@@ -995,7 +995,7 @@ class SC_db_layout {
                        // Draw the page header.
                $headerSection = $this->doc->getHeader('pages',$this->pageinfo,$this->pageinfo['_thePath']).'<br />'.
                                                $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.path',1).': '.
-                                               '<span title="'.htmlspecialchars($this->pageinfo['_thePathFull']).'">'.htmlspecialchars(t3lib_div::fixed_lgd_pre($this->pageinfo['_thePath'],50)).'</span>';
+                                               '<span title="'.htmlspecialchars($this->pageinfo['_thePathFull']).'">'.htmlspecialchars(t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'],-50)).'</span>';
 
 
                        // Create icon "toolbar" for common operations like creating/moving elements/pages etc.
index 039477f..fd9c5e3 100755 (executable)
@@ -1,21 +1,21 @@
 <?php
 /***************************************************************
 *  Copyright notice
-* 
+*
 *  (c) 1999-2004 Kasper Skaarhoj (kasper@typo3.com)
 *  All rights reserved
-* 
+*
 *  This script is part of the TYPO3 project. TYPO3 is free software;
-*  You can redistribute it and/or modify it under the terms of the 
+*  You can redistribute it and/or modify it under the terms of the
 *  TYPO3 License as published from the www.typo3.com website.
-* 
+*
 *  This script is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-* 
+*
 *  This copyright notice MUST APPEAR in all copies of this script
 ***************************************************************/
-/** 
+/**
  * Contains the TYPO3 Backend Language class
  *
  * $Id$
  *
  *
  *
- *   79: class language 
- *  127:     function init($lang,$altPath='')  
- *  172:     function addModuleLabels($arr,$prefix)    
- *  198:     function hscAndCharConv($lStr,$hsc)       
- *  213:     function makeEntities($str)       
- *  230:     function JScharCode($str) 
- *  249:     function getLL($index,$hsc=0)     
- *  266:     function getLLL($index,$LOCAL_LANG,$hsc=0)        
- *  286:     function sL($input,$hsc=0)        
- *  330:     function loadSingleTableDescription($table)       
- *  382:     function includeLLFile($fileRef,$setGlobal=1,$mergeLocalOntoDefault=0)    
- *  427:     function readLLfile($fileRef)     
- *  441:     function localizedFileRef($fileRef)       
+ *   79: class language
+ *  127:     function init($lang,$altPath='')
+ *  172:     function addModuleLabels($arr,$prefix)
+ *  198:     function hscAndCharConv($lStr,$hsc)
+ *  213:     function makeEntities($str)
+ *  230:     function JScharCode($str)
+ *  249:     function getLL($index,$hsc=0)
+ *  266:     function getLLL($index,$LOCAL_LANG,$hsc=0)
+ *  286:     function sL($input,$hsc=0)
+ *  330:     function loadSingleTableDescription($table)
+ *  382:     function includeLLFile($fileRef,$setGlobal=1,$mergeLocalOntoDefault=0)
+ *  427:     function readLLfile($fileRef)
+ *  441:     function localizedFileRef($fileRef)
  *
  * TOTAL FUNCTIONS: 12
  * (This index is automatically created/updated by the extension "extdeveval")
  *
  */
 
+
 
 
 
@@ -82,10 +82,10 @@ class language {
 
                // Default charset in backend
        var $charSet = 'iso-8859-1';
-       
+
                // Array with alternative charsets for other languages. (Moved to t3lib_cs, Set from csConvObj!)
        var $charSetArray = array();
-       
+
                // This is the url to the TYPO3 manual
        var $typo3_help_url= 'http://www.typo3.com/man_uk/';
                // Array with alternative URLs based on language.
@@ -104,7 +104,7 @@ class language {
                // Internal charset conversion:
        var $origCharSet='';            // If set, then it means that the this->charSet is set to a forced, common value for the WHOLE backend regardless of user language. And THIS variable will contain the original charset for the language labels. With ->csConvObj we must then convert the original charset to the charset used in the backend from now on.
        var $csConvObj;                         // An instance of the "t3lib_cs" class. May be used by any application.
-       
+
 
 
 
@@ -124,7 +124,7 @@ class language {
         * @param       string          IGNORE. Not used.
         * @return      void
         */
-       function init($lang,$altPath='')        {       
+       function init($lang,$altPath='')        {
 
                        // Initialize the conversion object:
                $this->csConvObj = t3lib_div::makeInstance('t3lib_cs');
@@ -133,7 +133,7 @@ class language {
                        // Internally setting the list of TYPO3 backend languages.
                $this->langSplit=TYPO3_languages;
 
-                       // Finding the requested language in this list based on the $lang key being inputted to this function.                  
+                       // Finding the requested language in this list based on the $lang key being inputted to this function.
                $ls = explode('|',$this->langSplit);
                while(list($i,$v)=each($ls))    {
                        if ($v==$lang)  {       // Language is found. Configure it:
@@ -149,7 +149,7 @@ class language {
                                // Set the forced charset:
                        $this->origCharSet = $this->charSet;
                        $this->charSet = $GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'];
-                       
+
                        if ($this->charSet!='utf-8' && !$this->csConvObj->initCharset($this->charSet))          {
                                t3lib_BEfunc::typo3PrintError ('The forced character set "'.$this->charSet.'" was not found in t3lib/csconvtbl/','Forced charset not found');
                                exit;
@@ -185,7 +185,7 @@ class language {
                        }
                }
        }
-       
+
        /**
         * Will htmlspecialchar() the input string and before that any charset conversion will also have taken place if needed (see init())
         * Used to pipe language labels through just before they are returned.
@@ -195,14 +195,14 @@ class language {
         * @return      string          The processed string
         * @see init()
         */
-       function hscAndCharConv($lStr,$hsc)     {       
+       function hscAndCharConv($lStr,$hsc)     {
                $lStr = $hsc ? htmlspecialchars($lStr) : $lStr;
                if ($this->origCharSet) {
                        $lStr = $this->csConvObj->conv($lStr,$this->origCharSet,$this->charSet,1);
                }
                return $lStr;
        }
-       
+
        /**
         * Will convert the input strings special chars (all above 127) to entities. The string is expected to be encoded in the charset, $this->charSet
         * This function is used to create strings that can be used in the Click Menu (Context Sensitive Menus). The reason is that the values that are dynamically written into the <div> layer is decoded as iso-8859-1 no matter what charset is used in the document otherwise (only MSIE, Mozilla is OK). So by converting we by-pass this problem.
@@ -213,7 +213,7 @@ class language {
        function makeEntities($str)     {
                        // Convert string to UTF-8:
                if ($this->charSet!='utf-8')    $str = $this->csConvObj->utf8_encode($str,$this->charSet);
-               
+
                        // Convert string back again, but using the full entity conversion:
                $str = $this->csConvObj->utf8_to_entities($str);
                return $str;
@@ -228,7 +228,7 @@ class language {
         * @return      string          Output string, a JavaScript function: "String.fromCharCode(......)"
         */
        function JScharCode($str)       {
-       
+
                        // Convert string to UTF-8:
                if ($this->charSet!='utf-8')    $str = $this->csConvObj->utf8_encode($str,$this->charSet);
 
@@ -254,7 +254,7 @@ class language {
                        return $this->hscAndCharConv($GLOBALS['LOCAL_LANG']['default'][$index], $hsc);  // Returns default label
                }
        }
-       
+
        /**
         * Works like ->getLL() but takes the $LOCAL_LANG array used as the second argument instead of using the global array.
         *
@@ -271,7 +271,7 @@ class language {
                        return $this->hscAndCharConv($LOCAL_LANG['default'][$index], $hsc);             // Returns default label
                }
        }
-       
+
        /**
         * splitLabel function
         * Historically labels were exploded by '|' and each part would correspond to the translation of the language found at the same 'index' in the TYPO3_languages constant.
@@ -307,19 +307,19 @@ class language {
                                                $tempLL = $this->readLLfile($lFileRef);
                                                $this->LL_files_cache[$parts[0]][$this->lang] = $tempLL[$this->lang];
                                        }
-                                       
+
                                                // Overriding file?
                                        if (isset($GLOBALS['TYPO3_CONF_VARS']['BE']['XLLfile'][$parts[0]]))     {
                                                $ORarray = $this->readLLfile($GLOBALS['TYPO3_CONF_VARS']['BE']['XLLfile'][$parts[0]]);
                                                $this->LL_files_cache[$parts[0]] = t3lib_div::array_merge_recursive_overrule($this->LL_files_cache[$parts[0]],$ORarray);
-                                       }                                       
+                                       }
                                }
                                $this->LL_labels_cache[$this->lang][$input] = $this->getLLL($parts[1],$this->LL_files_cache[$parts[0]]);
                        }
                        return $hsc ? t3lib_div::deHSCentities(htmlspecialchars($this->LL_labels_cache[$this->lang][$input])) : $this->LL_labels_cache[$this->lang][$input]; // For the cached output charset conversion has already happend! So perform HSC right here.
                }
        }
-       
+
        /**
         * Loading $TCA_DESCR[$table]['columns'] with content from locallang files as defined in $TCA_DESCR[$table]['refs']
         * $TCA_DESCR is a global var
@@ -330,8 +330,8 @@ class language {
        function loadSingleTableDescription($table)     {
                global $TCA_DESCR;
 
-               if (is_array($TCA_DESCR[$table]) 
-                               && !isset($TCA_DESCR[$table]['columns']) 
+               if (is_array($TCA_DESCR[$table])
+                               && !isset($TCA_DESCR[$table]['columns'])
                                && is_array($TCA_DESCR[$table]['refs']))         {      // First the 'table' cannot already be loaded in [columns] and secondly there must be a references to locallang files available in [refs]
 
                                // Init $TCA_DESCR for $table-key
@@ -344,17 +344,17 @@ class language {
                                        // Traverse all keys
                                if (is_array($LOCAL_LANG['default']))   {
                                        foreach($LOCAL_LANG['default'] as $lkey => $lVal)       {
-       
+
                                                        // exploding by '.':
-                                                       // 0 => fieldname, 
-                                                       // 1 => type from (alttitle,description,details,syntax,image_descr,image,seeAlso), 
+                                                       // 0 => fieldname,
+                                                       // 1 => type from (alttitle,description,details,syntax,image_descr,image,seeAlso),
                                                        // 2 => special instruction, see switch construct
                                                $kParts = explode('.',$lkey);
-       
+
                                                        // Detecting 'hidden' labels, converting to normal fieldname
                                                if ($kParts[0]=='_')    $kParts[0]='';
                                                if (substr($kParts[0],0,1)=='_')        { $kParts[0] = substr($kParts[0],1); }
-       
+
                                                        // Add label:
                                                switch((string)$kParts[2])      {
                                                        case '+':       // adding
@@ -387,18 +387,18 @@ class language {
 
                        // Get default file:
                $llang = $this->readLLfile($fileRef);
-               
+
                if (count($llang))      {
 
                        $LOCAL_LANG = t3lib_div::array_merge_recursive_overrule($LOCAL_LANG,$llang);
-                       
+
                                // Localized addition?
                        $lFileRef = $this->localizedFileRef($fileRef);
                        if ($lFileRef && (string)$LOCAL_LANG[$this->lang]=='EXT')       {
                                $llang = $this->readLLfile($lFileRef);
                                $LOCAL_LANG = t3lib_div::array_merge_recursive_overrule($LOCAL_LANG,$llang);
                        }
-                       
+
                                // Overriding file?
                        if (isset($GLOBALS['TYPO3_CONF_VARS']['BE']['XLLfile'][$fileRef]))      {
                                $ORarray = $this->readLLfile($GLOBALS['TYPO3_CONF_VARS']['BE']['XLLfile'][$fileRef]);
@@ -411,13 +411,13 @@ class language {
                                unset($LOCAL_LANG[$this->lang]);
                        }
                }
-               
+
                        // Return value if not global is set.
                if (!$setGlobal)        {
                        return $LOCAL_LANG;
                }
        }
-       
+
        /**
         * Includes a locallang file and returns the $LOCAL_LANG array found inside.
         *
@@ -431,7 +431,7 @@ class language {
                }
                return is_array($LOCAL_LANG)?$LOCAL_LANG:array();
        }
-       
+
        /**
         * Returns localized fileRef (.[langkey].php)
         *
index 936a0cc..d56fb8f 100755 (executable)
@@ -391,7 +391,7 @@ class template {
 
                return '<span class="typo3-moduleHeader">'.$this->wrapClickMenuOnIcon($iconImgTag,$table,$row['uid']).
                                $viewPage.
-                               $tWrap[0].htmlspecialchars(t3lib_div::fixed_lgd($title,45)).$tWrap[1].'</span>';
+                               $tWrap[0].htmlspecialchars(t3lib_div::fixed_lgd_cs($title,45)).$tWrap[1].'</span>';
        }
 
        /**
@@ -405,7 +405,7 @@ class template {
         */
        function getFileheader($title,$path,$iconfile)  {
                $fileInfo = t3lib_div::split_fileref($title);
-               $title = htmlspecialchars(t3lib_div::fixed_lgd_pre($fileInfo['path'],35)).'<b>'.htmlspecialchars($fileInfo['file']).'</b>';
+               $title = htmlspecialchars(t3lib_div::fixed_lgd_cs($fileInfo['path'],-35)).'<b>'.htmlspecialchars($fileInfo['file']).'</b>';
                return '<span class="typo3-moduleHeader"><img'.t3lib_iconWorks::skinImg($this->backPath,$iconfile,'width="18" height="16"').' title="'.htmlspecialchars($path).'" alt="" />'.$title.'</span>';
        }