Fixed bug #7860: Coloring in TS Object Browser depends on Crop Lines (thanks to Steff...
authorJeff Segars <jsegars@alumni.rice.edu>
Mon, 19 May 2008 19:21:06 +0000 (19:21 +0000)
committerJeff Segars <jsegars@alumni.rice.edu>
Mon, 19 May 2008 19:21:06 +0000 (19:21 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3663 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tsparser_ext.php
typo3/sysext/tstemplate_objbrowser/class.tx_tstemplateobjbrowser.php

index f911598..73a746d 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-05-19  Jeff Segars  <jeff@webempoweredchurch.org>
+
+       * Fixed bug #7860: Coloring in TS Object Browser depends on "Crop Lines" (thanks to Steffen Kamper)
+
 2008-05-19  Oliver Hader  <oliver@typo3.org>
 
        * Fixed bug #8454: IRRE - Localization mode is not fetched correctly
index a869bd7..173f33b 100755 (executable)
@@ -697,7 +697,11 @@ class t3lib_tsparser_ext extends t3lib_TStemplate  {
        function ext_fixed_lgd($string,$chars)  {
                if ($chars >= 4)        {
                        if(strlen($string)>$chars)  {
-                               return substr($string, 0, $chars-3).'...';
+                               if(strlen($string)>24 && substr($string,0,12) == '##'.$this->Cmarker.'_B##') {
+                                       return '##'.$this->Cmarker.'_B##'.t3lib_div::fixed_lgd_cs(substr($string,12,-12), $chars-3).'##'.$this->Cmarker.'_E##';
+                               } else {
+                                       return t3lib_div::fixed_lgd_cs($string, $chars-3);
+                               }
                        }
                }
                return $string;
index b8a68d8..31ad36a 100644 (file)
@@ -293,7 +293,7 @@ class tx_tstemplateobjbrowser extends t3lib_extobjbase {
                $tmpl->matchAlternative = $this->pObj->MOD_SETTINGS['tsbrowser_conditions'];
                $tmpl->matchAlternative[] = 'dummydummydummydummydummydummydummydummydummydummydummy';  // This is just here to make sure that at least one element is in the array so that the tsparser actually uses this array to match.
 
-               $tmpl->constantMode = $this->pObj->MOD_SETTINGS["ts_browser_fixedLgd"] ? "" : $this->pObj->MOD_SETTINGS["ts_browser_const"];
+               $tmpl->constantMode = $this->pObj->MOD_SETTINGS["ts_browser_const"];
                if ($this->pObj->sObj && $tmpl->constantMode)   {$tmpl->constantMode = "untouched";}
 
                $tmpl->regexMode = $this->pObj->MOD_SETTINGS["ts_browser_regexsearch"];
@@ -517,7 +517,8 @@ class tx_tstemplateobjbrowser extends t3lib_extobjbase {
                        $menu = '<label for="checkTs_browser_fixedLgd">Crop lines:</label> '.t3lib_BEfunc::getFuncCheck($this->pObj->id,"SET[ts_browser_fixedLgd]",$this->pObj->MOD_SETTINGS["ts_browser_fixedLgd"],'','','id="checkTs_browser_fixedLgd"');
                        $menu .= '<br /><label for="checkTs_browser_showComments">Display comments:</label> '.t3lib_BEfunc::getFuncCheck($this->pObj->id,'SET[ts_browser_showComments]',$this->pObj->MOD_SETTINGS['ts_browser_showComments']);
                        $menu .= '<br /><label for="checkTs_browser_alphaSort">Sort alphabetically:</label> '.t3lib_BEfunc::getFuncCheck($this->pObj->id,'SET[ts_browser_alphaSort]',$this->pObj->MOD_SETTINGS['ts_browser_alphaSort'],'','','id="checkTs_browser_alphaSort"');
-                       if ($bType=="setup" && !$this->pObj->MOD_SETTINGS["ts_browser_fixedLgd"])       {
+               
+                       if ($bType=="setup")    {
                                $menu.= "<br />Constants display: ".t3lib_BEfunc::getFuncMenu($this->pObj->id,"SET[ts_browser_const]",$this->pObj->MOD_SETTINGS["ts_browser_const"],$this->pObj->MOD_MENU["ts_browser_const"]);
                        }
                        $theOutput.=$this->pObj->doc->section("",'<NOBR>'.$menu.'</NOBR>');