Fixed bug #10272: t3lib_div::fixed_lgd_cs needs a third parameter for appending a...
authorSteffen Kamper <info@sk-typo3.de>
Tue, 27 Jan 2009 09:31:07 +0000 (09:31 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Tue, 27 Jan 2009 09:31:07 +0000 (09:31 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@4867 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_div.php

index 3ea408c..2545c5f 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2009-01-23  Steffen Kamper  <info@sk-typo3.de> 
 
+       Fixed bug  #10272: t3lib_div::fixed_lgd_cs needs a third parameter for appending a custom string to a truncated string (thanks to Uschi Renziehausen)
        Fixed bug  #10178: Toolbar menu fails if there are no menu items
 
 2009-01-26  Stanislas Rolland  <typo3@sjbr.ca>
index f7929dc..484a91d 100755 (executable)
@@ -602,18 +602,18 @@ final class t3lib_div {
         *
         * @param       string          string to truncate
         * @param       integer         must be an integer with an absolute value of at least 4. if negative the string is cropped from the right end.
+        * @param       string          appendix to the truncated string
         * @return      string          New string
-        * @see fixed_lgd()
         */
-       public static function fixed_lgd_cs($string, $chars) {
+       public static function fixed_lgd_cs($string, $chars, $appendString='...') {
                if (is_object($GLOBALS['LANG'])) {
-                       return $GLOBALS['LANG']->csConvObj->crop($GLOBALS['LANG']->charSet, $string, $chars, '...');
+                       return $GLOBALS['LANG']->csConvObj->crop($GLOBALS['LANG']->charSet, $string, $chars, $appendString);
                } elseif (is_object($GLOBALS['TSFE'])) {
-                       return $GLOBALS['TSFE']->csConvObj->crop($GLOBALS['TSFE']->charSet, $string, $chars, '...');
+                       return $GLOBALS['TSFE']->csConvObj->crop($GLOBALS['TSFE']->charSet, $string, $chars, $appendString);
                } else {
                                // this case should not happen
                        $csConvObj = t3lib_div::makeInstance('t3lib_cs');
-                       return $csConvObj->crop('iso-8859-1', $string, $chars, '...');
+                       return $csConvObj->crop('iso-8859-1', $string, $chars, $appendString);
                }
        }